+ Reply to Thread
Results 1 to 3 of 3

Single Search Output

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,176

    Single Search Output

    I have a spreadsheet (called “output”) with a single list of unique account numbers in column A. In columns B, C, D (column B = Invoice, column C = Sales, column D = class), I need to add information from a data file based upon certain search criteria which is as follows:

    For each account number I need to list an invoice number and the corresponding sales amount and class. I need to list the invoice with the “highest” sales amount. There is only one catch to the issue I am encountering and this is I need to first look for the highest amount in Class A sales, if no Class A sales, then look for the highest in Class B sales….and then Class C….and then Class D. If there are no sales in Class A, B, C, or D, then return a value of “no match found”.

    I have attached a spreadsheet that includes a sample of desired output for clarification. Thank you in advance for any comments.
    Attached Files Attached Files
    Last edited by maacmaac; 11-23-2009 at 09:07 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Single Search Output

    Hi,

    possible approach involving sorting the data sheet:

    Sort data sheet by Account ascending, Class ascending, Sales descending.

    Then on Output sheet:

    B2
    Please Login or Register  to view this content.
    C2 =IF(B2="no match found","",VLOOKUP($A2,data!$A$2:$D$70,3,FALSE))
    D2 =IF(B2="no match found","",VLOOKUP($A2,data!$A$2:$D$70,4,FALSE))

    copy down. see attached

    hth
    Attached Files Attached Files
    Last edited by teylyn; 11-23-2009 at 06:42 PM. Reason: attached file

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,176

    Re: Single Search Output

    Formulas are working as needed. Thank you.

+ 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