+ Reply to Thread
Results 1 to 9 of 9

Vlookup for multiple columns

  1. #1
    Registered User
    Join Date
    09-05-2008
    Location
    Bay Area
    Posts
    14

    Vlookup for multiple columns

    I've attached a sample of what I'm trying to accomplish.
    I am trying to have VLookup pull the values from multiple columns.
    In my sample, I am working on getting the data from the "Prices" sheet, to the "Worksheet." I want to pull the last price and cost. As you can see on the sample, they are not all on the same columns. I want it to pull the last cost and last price from the most recent PO and if that field is blank, move to the next most recent PO.
    Thanks!
    Attached Files Attached Files
    Last edited by Alpha Zero; 09-05-2008 at 04:26 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I don't see a "Prices" sheet nor a "Worksheet" sheet...

    Can you clarify where the info is coming from and where you want to see the results? Also, please give an example of an expected result.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-05-2008
    Location
    Bay Area
    Posts
    14
    Sorry, I attached the incorrect file.
    I've attached the correct one now.
    I also added a worksheet labeled "Results" to give an example of what should be in there at the end.
    Thanks!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Firstly, your entries in Order Entry must be formatted the same as your entries in the other sheets... so go to Order Entry and select column A.. then go to Data|Text to Columns and click Finish.. now everything is formatted as General.

    Then, I am not sure why you reference Order Entry in your Vlookup formulas on the Worksheet sheet.... you should reference column A on the Worksheet sheet...so change formula in B3 of Worksheet to:
    Please Login or Register  to view this content.
    Then in formula in E3 is:

    Please Login or Register  to view this content.
    and in F3:

    Please Login or Register  to view this content.
    both these formulas need to be individually confirmed with CTRL+SHIFT+ENTER not just ENTER. You will see { } brackets appear around them...

    Then copy them down..

    See attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-05-2008
    Location
    Bay Area
    Posts
    14
    That worked perfectly! Thanks a bunch!

    Sidenote:
    Is there a way to show blanks instead of #N/A on the blank vlookups?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Alpha Zero View Post
    That worked perfectly! Thanks a bunch!

    Sidenote:
    Is there a way to show blanks instead of #N/A on the blank vlookups?
    You're welcome...


    to show blanks instead of #N/A, you need an error trap...

    e.g.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-05-2008
    Location
    Bay Area
    Posts
    14
    The error trap has worked great.
    Now I have another question. Is there also a way to setup an error trap for words? I've tried a few combinations of ISERROR and what not and can't seem to figure out the correct way to do it.
    Thanks again for all the help.

  8. #8
    Registered User
    Join Date
    12-16-2006
    Location
    Bangkok
    MS-Off Ver
    Excel 2003
    Posts
    98
    Try using ISERROR instead

  9. #9
    Registered User
    Join Date
    12-16-2006
    Location
    Bangkok
    MS-Off Ver
    Excel 2003
    Posts
    98
    sorry, I meant that you can use ISTEXT to trap for strings

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VLOOKUP return multiple matches in columns
    By Gracie789 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-10-2008, 07:38 PM
  2. Vlookup using two columns-needs to match the first two column
    By pduubb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-01-2008, 01:21 PM
  3. VLOOKUP - Can you match columns other than column 1?
    By longfisher in forum Excel General
    Replies: 4
    Last Post: 03-04-2008, 10:07 PM
  4. VLookup multiple columns?
    By cheflauren34 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2007, 02:54 PM
  5. VLookup (possible to search two columns)?
    By stan123 in forum Excel General
    Replies: 2
    Last Post: 02-27-2007, 08:26 PM

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