+ Reply to Thread
Results 1 to 3 of 3

trouble using a vlookup return value

  1. #1
    Registered User
    Join Date
    03-29-2007
    Posts
    2

    trouble using a vlookup return value

    I have a spreadsheet that uses a vlookup to return an account number based on the part number it's looking for. This part works as it should. In another cell, I have a formula that is to look at the account number(from the vlookup) and return a company code based on a dollar value from another cell. My problem is that the formula isn't working, and not returning the proper company code.

    If I manually enter in the account number, the formula works as it should, and if I use the vlookup formula, and hit f2 and then f9 it looks at the pulled account number and locks it in the result, making the other formula work as designed as well. So it looks like to me is the vlookup result, is only for display, and the numbers can't be used or called to other cells. The f2+f9 comb works, but is vary tedious as this is an accounting report with multiple worksheets and thousands of parts. Is there a work around?


    (vlookup is in cell J15)
    =VLOOKUP($D15,PartList,8,FALSE)


    =IF(J15<120808,IF($I$9<20000,"210",IF($I$9<20200,"213",IF($I$9<25000,"214",IF($I$9<28000,"212",IF($I$9<40000,"210","200"))))),IF(J15=120812,"210","200"))

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,792
    Your VLOOKUP probably returns the account number in text format which means you get erroneous results from your second formula. The simplest way around this is probably a small tweak to the VLOOKUP to convert your account number to a real number, i.e.

    =VLOOKUP($D15,PartList,8,FALSE)+0

    Note: you may get the same problem with your second formula. Because it returns "200" or "210" etc. in quotes these are text values. If you need the result, for any reason, to be a number it's better to remove the quotes

  3. #3
    Registered User
    Join Date
    03-29-2007
    Posts
    2
    Wicked, It works perfectly. = Thanks for the help

+ 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