+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Converting text values to numerical values

  1. #1
    Registered User
    Join Date
    10-29-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    15

    Converting text values to numerical values

    am a teacher and am trying to create a datasheet with childrens levels on it. The levels are in the form of text.

    w being the lowest, then 1c, 1b, 1a, then 2c, 2b, 2a and so on upto a level 5a. Each level has a numerical value, w = 3, 1c = 7, 1b = 9, 1a = 11 and so on (increments of 2 each time).

    I need to create a formula that works out the difference between the childs grade at the end of the year (column B) from the childs grade at the beginning of the year (Column A) from text form with the answer shown in a numerical form.

    I have tried doing the following

    =IF(V27="w",3,IF(V27="1c",7,IF(V27="1b",9,IF(V27="1a",11,IF(V27="2c",13,IF(V27="2b",15,IF(V27="2a",1 7,))))))-IF(R27="w",-3,IF(R27="1c",7,IF(R27="1b",9,IF(R27="1a",11,IF(R27="2c",13,IF(R27="2b",15,IF(R27="2a",17,))))))))

    but has a limit of 8 entries and i need 15!

    Any ideas would be greatly appreciated as i am at a lost cause now

    Thanks
    Andy

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: Converting text values to numerical values

    Hi Andy, welcome to the forum.

    You might try:
    Please Login or Register  to view this content.
    Or, if you create a table with the lookup values in one column and the return values in another (e.g. A1:A16 and B1:B16), then you could use:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-18-2004
    Location
    Sheffield
    MS-Off Ver
    Excel, Access, 2007
    Posts
    42

    Re: Converting text values to numerical values

    I see Paul has given you the actual formula while I was creating a spreadsheet for you, but thought I might as well upload it anyway!
    Attached Files Attached Files
    I count on Excel for everything

  4. #4
    Registered User
    Join Date
    10-29-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Converting text values to numerical values

    You guys are a life saver. Thank you

  5. #5
    Registered User
    Join Date
    10-29-2010
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Converting text values to numerical values

    Ok last question i promise. I have been using the formula you guys supplied me with and it works like a dream. In the last part of my spreadsheet I have to change the formula slightly.

    I need to add 12 to a cell (CP5) but get the answer displayed as text again e.g. 1a, 1b etc. Any ideas, im sure its a simple fix??

    How do i ammend the following??

    =LOOKUP(CP5,{"1a","1b","1c","2a","2b","2c","3a","3b","3c","4a","4b","4c","5a","5b","5c","w"},{11,9,7,17,15,13,23,21,19,29,27,25,35,33,31,3})


    Andy

  6. #6
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Converting text values to numerical values

    well given the result of the last formula, this should convert it back to the original letters :-

    Please Login or Register  to view this content.
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  7. #7
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Converting text values to numerical values

    and the reverse again :-

    =IFERROR((LEFT(B6,1))*7+(99-CODE(RIGHT(B6,1)))*2,3)

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Converting text values to numerical values

    3 threads and no acknowledgment of others you are a pain!
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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