+ Reply to Thread
Results 1 to 9 of 9

Lookup with multiple criteria and offset

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    27

    Lookup with multiple criteria and offset

    Hi,

    I have a case where i need to do lookup based on some criteria.

    I have issues in selecting the proper range because of some constraints.

    I have attached my sample excel sheet, please check that. it will be easier for me to explain based on that.

    Data Sheet:

    Data sheet is my repository. here there are three companies listed and some brands are listed under these companies.( you can see all the brands are repeated under the companies)

    Then there are prices for those brands for some dates.

    Report Sheet:

    This sheet has a drop down which i need to use to select companies ( A, B or C).

    There are brands listed and i need to populate the prices for those brands from the other sheet for those dates. One catch is there is a field called as date offset. We need to offset the number of days given here to fetch the price

    For example: If the user has selected Company B from the drop down and brand A is sold for 10.8 dollars on 1st and if there is a Date offset of 1, which means in the Report sheet the price 10.8 should go under the date 2nd.

    Please let me know if you need more details or my explanation is not clear.

    Thanks,
    Sasi
    Attached Files Attached Files

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Lookup with multiple criteria and offset

    Sasi,

    In sheet 'Report' cell C6 and copied over and down to cell N13:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Lookup with multiple criteria and offset

    Try this, copid down and across...

    =OFFSET(INDIRECT("data!A"&MATCH($B$3,Data!$A$5:$A$31,0)+4),ROW(A1),MATCH(C$1,Data!$B$3:$K$3,0))

    edit: Tiger's post reminded me to add error trapping....
    =IF(A6="","",OFFSET(INDIRECT("data!A"&MATCH($B$3,Data!$A$5:$A$31,0)+4),ROW(A1),MATCH(C$1,Data!$B$3:$K$3,0)))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    04-04-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Lookup with multiple criteria and offset

    Hi,

    Thanks for the reply.

    I tried using the above formulas. But the date offset is not taken care of.
    If the date offset is 1, the prices for 1st June in data sheet should be mapped to 2nd June and so on..


    Please help

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Lookup with multiple criteria and offset

    Not sure about Tiger's suggestion, but I didnt use your "date offset" at all, I just matched the date on sheet1 to the date on sheet2. Is that not what you wanted...to have the dates matched?

  6. #6
    Registered User
    Join Date
    04-04-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Lookup with multiple criteria and offset

    Nope sorry about that..

    I was not clear inititally.

    Yes i need to use the date offset. In business perspective it is for collection of the sales.

    For some brands the collection is after a day and for a few it is 2 days

    So the report sheet should say the pending collections for that day.

    Hope it is clear.

    please look at the attached excel sheet, i would have placed the values accordingly.

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Lookup with multiple criteria and offset

    Sasi,

    My formula already does that. Attached is a modified version of the sample workbook you posted. You can see that the formula results and your expected results are identical. What's the issue?

  8. #8
    Registered User
    Join Date
    04-04-2013
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Lookup with multiple criteria and offset

    Yeah

    It Works... My Bad

    The sheet that i posted here was a sample, i modified your formula directly on my target sheet and had made mistake there...

    Thanks tigeravatar and FDibbins

  9. #9
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Lookup with multiple criteria and offset

    You're very welcome

+ 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. Replies: 11
    Last Post: 02-07-2013, 02:22 AM
  2. [SOLVED] Offset weeks with multiple criteria.
    By Sthlm in forum Excel General
    Replies: 5
    Last Post: 06-22-2012, 10:48 AM
  3. Replies: 2
    Last Post: 05-10-2012, 10:38 AM
  4. Summing multiple sheet range based on column and offset row lookup
    By SKAh in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-08-2011, 04:52 PM
  5. Replies: 1
    Last Post: 05-16-2011, 05:00 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