+ Reply to Thread
Results 1 to 5 of 5

Thread: lookup function?

  1. #1
    Registered User
    Join Date
    02-26-2008
    Posts
    6

    lookup function?

    Hi

    I have one spreadsheet with a list of produce, price etc. I would like to put yes in column A for some of the items (that we wish to order) and then on another sheet have it pull all the items (that have yes in column A) along with the name and price of each. If column A, cell ? is blank then it doesn't pull row of data in.

    See below for an example of the main sheet

    Yes Broccoli 14 bunch $27.00
    Broccoli Crowns 20 lb $33.00

    Can I do this with a function or is it a pivot table or something else!

    Thanks for your help!

    D

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636
    Please see attached.

    formula in Sheet2!A1:

    =IF(ROWS($A$1:$A1)>COUNTIF(Sheet1!$A$1:$A$100,"Yes"),"",INDEX(Sheet1!B$1:B$100,SMALL(IF(Sheet1!$A$1:$A$100="Yes",ROW(Sheet1!$A$1:$A$100)-ROWS(Sheet1!$A$1)+1),ROWS($A$1:$A1))))
    copied down as far as necessary and across as far as necessary.

    Note: This is an array formula and was confirmed with CTRL+SHIFT+ENTER not just ENTER. The { } brackets appear when confirming this way.

    Adjust ranges to suit in Sheet1!A1 and confirm using the CSE keys and then copy down and across.
    Attached Files Attached Files
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    02-26-2008
    Posts
    6
    Thanks for your help! I really appreciate it. Been going cross eyed trying to look through the help to find a solution but when you don't know what it's called it's almost impossible.

    Will give your solution a go and let you know how I get on!!!

    Thanks again


  4. #4
    Registered User
    Join Date
    02-26-2008
    Posts
    6
    Thanks again. Had a few issues to start with changing the ranges but managed to work it out!

    I can't thank you enough!

  5. #5
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636
    Great, thanks for the feedback!
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

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

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

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

+ 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.2.0