Results 1 to 6 of 6

Thread: Vlookup Problem

  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,423
    Thanks
    125
    Thanked 5 Times in 5 Posts

    Vlookup Problem

    I have the old account numbers in Col A (workbook "account numbers). I want to look up the new account number that is equivalent to the old account numberr in another workbook -New account numbers")

    The formula I have used is =VLOOKUP(A2,'[New account Numbers.xls]TB CONSOLIDATION'!$F:$G,2,FALSE)

    The result I get is "N/A

    Your assistance in resolving this will be most appreciated
    Attached Files Attached Files

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Howard,

    There is nothing wrong with your formula. Your problem is that the lookup table account numbers are formatted as TEXT and the ones in the sheet with the formula {Col A} are NUMBERS. If you enter the items in col a with a preceeding ' the formula works fine.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    FWIW, you could also use:
    =VLOOKUP(TEXT(A2,"0"),'[New account Numbers.xls]TB CONSOLIDATION'!$F:$G,2,FALSE)
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,423
    Thanks
    125
    Thanked 5 Times in 5 Posts

    Vlookup Problem

    Thanks for the reply. Is there a formiula that one could incorporate into the Vlookup to do this instead of ghaving to put a ' in front of the numbers?

  5. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Howard,

    That's what Rory's formula, in post 3, does.
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  6. #6
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,423
    Thanks
    125
    Thanked 5 Times in 5 Posts
    Hi Rory & RetiredGeek

    Thanks for the help. The formula supplied by Rory does the trick

Posting Permissions

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