+ Reply to Thread
Results 1 to 5 of 5

Need help with formula to convert text from one column to number in another

  1. #1
    Registered User
    Join Date
    10-01-2013
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2003/2007
    Posts
    2

    Need help with formula to convert text from one column to number in another

    Im using excel 2007 and I need help entering a formula that will take the text from one column and have a number associated with it in the next column.

    Example: Accident = 1
    Failure = 2
    Violation = 3

    Please help someone PLEASE!

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Need help with formula to convert text from one column to number in another

    make a table with the options and use Vlookup to find those values.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Need help with formula to convert text from one column to number in another

    Try

    =LOOKUP(A1,{"Accident","Failure","Violation"},{1,2,3})
    or
    =MATCH(A1,{"Accident","Failure","Violation"},0)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Registered User
    Join Date
    10-01-2013
    Location
    Atlanta, Georgia
    MS-Off Ver
    Excel 2003/2007
    Posts
    2

    Re: Need help with formula to convert text from one column to number in another

    I am still having trouble entering the information. an error message of N/A is given.

    Date Incident Incident CODE Location of Incident Driver Agent
    10/1/2013 ACCIDENT

    Column A = Date
    Column B = Incident ( which will be coded/ A(accident = 1); F(failure to comply = 2); V(violation = 3).
    Column C = Incident code
    Column D = Location
    Column E = Violator
    Column F = Agent

    I need a formula for columns B & C -
    Example:
    Accident = 1
    Failure = 2
    Violation = 3

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Need help with formula to convert text from one column to number in another

    Try in column C

    =LOOKUP(B2,{"A","F","V"},{1,2,3})
    or
    =MATCH(B2,{"A","F","V"},0)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA to convert cell to text and ensuring 7 digit number all along in entire column.
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-19-2013, 09:35 AM
  2. [SOLVED] Formula to convert date to text/number
    By Schwartz in forum Excel General
    Replies: 7
    Last Post: 04-20-2012, 04:26 PM
  3. Excel 2007 : use formula to convert text to number
    By fentontech in forum Excel General
    Replies: 3
    Last Post: 11-15-2011, 11:11 AM
  4. Excel 2007 : Convert Text/Number Column into MM/DD/YYYY
    By ProjectMASE in forum Excel General
    Replies: 5
    Last Post: 06-21-2010, 05:14 PM
  5. Replies: 9
    Last Post: 10-31-2005, 08:05 PM

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