+ Reply to Thread
Results 1 to 7 of 7

Text vs Number when using lookup table of numbers

  1. #1
    Registered User
    Join Date
    03-02-2007
    Location
    Cambridge, UK
    MS-Off Ver
    2003
    Posts
    4

    Question Text vs Number when using lookup table of numbers

    Hello,

    I have a load of cells which are generated by a formula. The results of the formula are all numbers.

    I then have a lookup table in which these numbers are looked up and the corresponding values printed (obviously!).

    Problem is... some of the results from the original formula really are numbers (10), and some of them are text that look like numbers (="10").

    The values that are equivalent to ="10" are not being looked up correctly in the lookup table, due to not strictly being a "number" and therefore my spreadsheet isn't working correctly.

    Does anyone know how to fix this?

    And no - i can't replace ="10" with just 10 due to the way the values are worked out, unfortunately.

    Is there a function that says "even though this is text, treat it as a number"?

    Thanks in advance for any suggestions! :D
    Last edited by fishsponge; 03-02-2007 at 05:03 AM. Reason: Added signature :-)
    ><> fishsponge <><
    www.rhobbs.co.uk

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Hi,

    What is the lookup formula you are using?




    Isn't ="10" the same as '10 ?

  3. #3
    Registered User
    Join Date
    03-02-2007
    Location
    Cambridge, UK
    MS-Off Ver
    2003
    Posts
    4
    Please Login or Register  to view this content.
    and no, ="10" is not the same as 10 due to the quotes. The quotes mean it is treated as text, not a number, despite the characters being made up from numbers!

    =10 is the same as 10, but it is not the same with the quotes.
    Last edited by fishsponge; 03-02-2007 at 05:33 AM.

  4. #4
    Registered User
    Join Date
    03-02-2007
    Location
    Cambridge, UK
    MS-Off Ver
    2003
    Posts
    4
    anyone else got any ideas? Surely this problem must have been stumbled across before?

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486
    Quote Originally Posted by fishsponge
    Please Login or Register  to view this content.
    and no, ="10" is not the same as 10 due to the quotes. The quotes mean it is treated as text, not a number, despite the characters being made up from numbers!

    =10 is the same as 10, but it is not the same with the quotes.
    Maybe try vlookup(b28,$A$11:$B$25,2,false)

    By the way I typed '10 not 10

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    A couple of points...

    If you're using LOOKUP then your lookup range, A11:A25 should be sorted ascending.

    You can probably convert your text "numbers" to real numbers by amending your original formula, e.g. enclosing in a VALUE function or adding +0 at the end then your LOOKUP should work, unamended.

    Alternatively leave your original formula alone and convert within LOOKUP, i.e.

    =LOOKUP(B28+0,$A$11:$B$25)

  7. #7
    Registered User
    Join Date
    03-02-2007
    Location
    Cambridge, UK
    MS-Off Ver
    2003
    Posts
    4
    perfect! thank you!

    I used VALUE() in the end :D

+ 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