+ Reply to Thread
Results 1 to 5 of 5

V-Lookup for numbers in various formats

  1. #1
    Registered User
    Join Date
    09-16-2006
    Posts
    37

    V-Lookup for numbers in various formats

    I assumed that V-Lookup recognizes numbers in whichever format they are. This does not seem to be the case, however. Formatting the columns of a variety of entries (text, number) doesn't work. Although after formatting the column to number and the format APPEARS to be number, it is not. And V-Lookup still won't pick it up. Anyone know what a solution to this might be?

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    V-Lookup for numbers in various formats

    Hi, rena

    You'll need to give an example of what you're experiencing.
    VLOOKUP is properly differentiating numeric text from numbers in Excel 2002 and 2003.

    Example:
    Please Login or Register  to view this content.
    If D1: 1
    E1: =VLOOKUP(D1,A1:B8,2,0)
    Formula returns x

    If D1: '1
    E1: =VLOOKUP(D1,A1:B8,2,0)
    Formula returns g

    However, you might be running into this problem.....
    If you change a number's format to Text
    <format><cells><number tab>....Category: Text

    ....The number will 'look like' text, but won't actually convert until you edit the cell and press [enter]
    (If you have a lot of these, I can show you a shortcut to editing all the cells)

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    09-16-2006
    Posts
    37

    My suggestion will work for any number of digits, e.g.

    Surprise, that was a quick response.

    Actually the only reason I have all these various formats is because many people make entries in the spreadsheet via copy/paste (from a mainframe program) and I can never be certain what the result of the copy/paste is (text? number?). What I started to do is format the initial entries (which I will compare to later) into number and then do the same thing for the new entries. Don't know whether it will work. I have two v-lookups (for duplicate entries) for the same items (invoice #, waybill#) and this is how I realized that the v-lookup didn't give me accurate results (the invoice # showed up but not the waybill number). As you surmised, there are quite a few entries and to do the F2 thing would take some time (would that give me text or number?). But if you know of a quick way to do this, I would appreciate knowing about this regardless as I very often have to convert large numbers (+s) to show the actual number.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    V-Lookup for numbers in various formats

    Here you go....

    If you want all of the values to be numeric:

    Select the range of values
    Set the number format to an appropriate Number Format

    Then (from the Excel Main Menu):
    <data><text-to-columns>....Click [Next] until Step_3_of_3
    Check: General...................Click [Finish]

    OR....if you want them all to be Text
    Set the format to Text
    In text-to-columns Step_3_of_3.....Check: Text

    That should do it.....Does it?

  5. #5
    Registered User
    Join Date
    09-16-2006
    Posts
    37

    V-Lookup for numbers in various formats

    Hi again,

    I haven't tried your suggestion yet but I will (I remember using data/text-to-columns before for Access) but I wasn't sure what it actually did. I assumed it formatted the columns in a certain way. For now I'm starting out formatting the columns in question as numbers (hoping they actually "convert" if they're not). I'm not sure if I will continue this as I also have zeros in front of numbers - easier to add text formatted than number formatted.

    But for your idea, I will have to create a test to see how and if it works. Will let you know when I've actually done it.

    Rena

+ 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