+ Reply to Thread
Results 1 to 6 of 6

Convert Text Values to Specific Numeric Values

  1. #1
    Registered User
    Join Date
    08-07-2008
    Location
    Seattle
    Posts
    28

    Convert Text Values to Specific Numeric Values

    Hi,

    I have a table with several columns of characteristics from a given marketing campaign. Ultimately I would like to measure each individual description characteristic against campaign success rates. I have determined that I must convert the text entries describing each characteristic into a numeric value. This is where I'm stuck. Can anyone help with this?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    See Help for VLOOKUP
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi
    Just create a simple two column table of all description characteristics in one column and a numeric value alongside in the next column. Then use a VLOOKUP() function to lookup up the value in the table against the corresponding description.

    HTH

  4. #4
    Registered User
    Join Date
    08-07-2008
    Location
    Seattle
    Posts
    28
    I will give that a shot, thanks!!

  5. #5
    Registered User
    Join Date
    08-30-2014
    Location
    iran
    MS-Off Ver
    2010
    Posts
    1

    Re: Convert Text Values to Specific Numeric Values

    the best code from ghasem76
    ActiveSheet.Range("b5:b6004,g5:g6004").Select

    For Each xCell In Selection
    If IsNumeric(xCell) = False Then
    ' xCell.Value = CDec(xCell.Value)
    xCell.Value = Val(xCell.Value)
    Else
    End If
    Next xCell

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Convert Text Values to Specific Numeric Values

    ghasem76, welcome to the forum

    This thread is over 5 years old, I doubt anyone is still monitoring it
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1