Consulting

Results 1 to 3 of 3

Thread: Need help Restructuring current macro to translate different type of data, please!!!

  1. #1
    VBAX Mentor
    Joined
    Feb 2016
    Posts
    382
    Location

    Need help Restructuring current macro to translate different type of data, please!!!

    The data I have now doesnt work in scatter chart so I need to translate the letter to a number.
    I have attached a file.


    The column B and Column C contain the key chart.

    Column D contains the data that needs to be translated to a number.
    The result would go into column E leaving column D intact.

    Thank you!!!!
    Attached Files Attached Files

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    This seems easer

    Option Explicit
    
    Sub Translate()
        Dim X As Variant, V As Variant
        Dim rStart As Range, rEnd As Range, rCell As Range
        Dim i As Long
         
         Application.ScreenUpdating = False
    
        Set rStart = Range("D38")
        Set rEnd = rStart.End(xlDown)
         
        For Each rCell In Range(rStart, rEnd).Cells
            rCell.Offset(0, 1).Value = Asc(rCell.Value) - 64
        Next
         Application.ScreenUpdating = True
        
    End Sub
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  3. #3
    VBAX Mentor
    Joined
    Feb 2016
    Posts
    382
    Location
    Thank you Very much!!!! much better!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •