+ Reply to Thread
Results 1 to 5 of 5

FIND PRICE COST from MAX DATE based on ITEM ID and SALE DATE

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    NY
    MS-Off Ver
    Excel Office 365
    Posts
    49

    FIND PRICE COST from MAX DATE based on ITEM ID and SALE DATE

    I have 2 worksheets attached.

    The 1st has an UNIT ID along with DATE, QTY SOLD, TOTAL $ Sold. I want another column showing UNIT COST.

    This unit cost is found by looking at the UNIT ID and DATE from the 1st sheet, looking at the 2nd sheet and finding the UNIT COST of the item that is the most recent date.

    So, in the worksheet 1, the 1st item on line 2, the answer should give me: $2.00.


    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: FIND PRICE COST from MAX DATE based on ITEM ID and SALE DATE

    hi there. perhaps you can give more answers like you did for line 2 so that we can see a pattern. i'm guessing:
    =LOOKUP(2,1/((SHEET2!$A$2:$A$11=A2)*(SHEET2!$B$2:$B$11<=B2)),SHEET2!$C$2:$C$11)

    it would be better if you can convert Sheet2 range into a Table. just go to cell A1 of Sheet2 and press CTRL + T. press ok. that way, your range is dynamic. when it increases to 100 rows for eg, you don't have to change the formula

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    01-02-2013
    Location
    NY
    MS-Off Ver
    Excel Office 365
    Posts
    49

    Re: FIND PRICE COST from MAX DATE based on ITEM ID and SALE DATE

    I’ll do that and get back. Could you explain what the formula you posted is doing, briefly, so I can get a better understanding of it? Thanks for the response. I’ll let you know when I get a chance to try it.

  4. #4
    Registered User
    Join Date
    01-02-2013
    Location
    NY
    MS-Off Ver
    Excel Office 365
    Posts
    49

    Thumbs up Re: FIND PRICE COST from MAX DATE based on ITEM ID and SALE DATE

    Benishiryo - attached is the sheet with your requests. It appears, to me, that it is working flawlessly.

    While you review my attachment, I will implement this over to my true data and see how it goes.
    In the meantime, could you, or someone, explain how this formula you gave: =LOOKUP(2,1/((SHEET2!$A$2:$A$18=A2)*(SHEET2!$B$2:$B$18<=B2)),SHEET2!$C$2:$C$18)
    is working?

    Not understanding why the first 2 values of 2,1 after lookup are in there and if those would need to change at any time.

    Thanks
    Attached Files Attached Files
    Last edited by aetedford; 01-18-2018 at 09:54 AM.

  5. #5
    Registered User
    Join Date
    01-02-2013
    Location
    NY
    MS-Off Ver
    Excel Office 365
    Posts
    49

    Thumbs up Re: FIND PRICE COST from MAX DATE based on ITEM ID and SALE DATE

    Wow - found the reference to the formula here: https://goo.gl/h5ZzCy

    Great job.

    Only issue I have is that I have millions of rows so this will take some time.

+ 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. [SOLVED] Find the latest price based on the date
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2016, 01:03 PM
  2. [SOLVED] Item Cost + eBay Fee % = NOT Item Sale Price, so what is?
    By CatSqueezer in forum Excel General
    Replies: 8
    Last Post: 05-31-2015, 03:32 AM
  3. Replies: 3
    Last Post: 03-22-2014, 01:54 PM
  4. [SOLVED] Total line item sale qty to be sum in a cell as date wise
    By geromio in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-15-2013, 10:50 PM
  5. Replies: 3
    Last Post: 01-03-2013, 12:32 AM
  6. [SOLVED] formula for cost as percentage of sale price
    By elisabeth in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-21-2006, 01:50 PM
  7. Retrieving Sale Price Based on Item and Color Criteria
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-25-2005, 03:01 AM

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