+ Reply to Thread
Results 1 to 7 of 7

Returning the last price paid and the date is was bought. THE ANSWER MUST BE OUT THERE!

  1. #1
    Registered User
    Join Date
    10-08-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Returning the last price paid and the date is was bought. THE ANSWER MUST BE OUT THERE!

    Hello,

    I work in a purchasing function and have a reasonable grasp of excel. However, periodically I need to value stock and the way we do this is to list out the stock items and then put the last price paid and last date purchased next to them.

    At the moment I do this manually and I feel like there must be a way to automate a chunk of it.

    Sheets involved: Master order sheet (logs all the purchases and the dates) and Stock valuation sheet (lists the stock and needs some info from the Master order sheet)

    I've coded all the stock so that I have a unique identifier and I can do a simple vlookup or index match to populate my stoke take valuation sheet from the master ordering sheet. The problem comes because I will purchase the same item multiple times. So really what I need is to return the highest date against a specific item and then in a separate column the rate on that date for that item.

    I have been looking at arrays but they are currently beyond me.

    Any help would be greatly appreciated.

    UPDATE: 2 files attached. I have highlighted the cells that should be interacting.

    The Last purchased Tonne Rate on the valuation sheet should be populated from the Tonne Rate cell on the Master order sheet.
    The last purchased date on the valuation sheet should be populated from the Date ordered cell on the Master order sheet.
    The product code/Short code is the unique element.

    The master order sheet can potentially be thousands of lines long come the end of the year.


    Thanks.
    Attached Files Attached Files
    Last edited by bigsi1984; 07-13-2016 at 04:05 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,735

    Re: Returning the last price paid and the date is was bought. THE ANSWER MUST BE OUT THERE

    Please post a sample Excel file (Not image) showing expected results.

    To upload file click "Go Advanced" then scroll down to "Manage attachments": "Browse", select file, "Upload" then "Close Window"

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Returning the last price paid and the date is was bought. THE ANSWER MUST BE OUT THERE

    It can be done, but we need some actual sheet specific details, ranges etc..

    Can you attach a small sample file ?

  4. #4
    Registered User
    Join Date
    07-12-2016
    Location
    oman
    MS-Off Ver
    excel 2007
    Posts
    1

    Re: Returning the last price paid and the date is was bought. THE ANSWER MUST BE OUT THERE

    Pl share your samples worksheets

  5. #5
    Registered User
    Join Date
    10-08-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Returning the last price paid and the date is was bought. THE ANSWER MUST BE OUT THERE

    Attachments should be on now. Thanks

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,735

    Re: Returning the last price paid and the date is was bought. THE ANSWER MUST BE OUT THERE

    in J2

    =IFERROR(IF(MATCH($N2,'Master order sheet.xlsx'!$U$2:$U$400,0),INDEX('Master order sheet.xlsx'!$S$2:$S$400,MATCH(MAX(('Master order sheet.xlsx'!$U$2:$U$400=$N2)*('Master order sheet.xlsx'!$D$2:$D$400)),(('Master order sheet.xlsx'!$U$2:$U$400=$N2)*('Master order sheet.xlsx'!$D$2:$D$400)),0)),""),0)


    in K2

    =IFERROR(IF(MATCH($N2,'Master order sheet.xlsx'!$U$2:$U$400,0),INDEX('Master order sheet.xlsx'!$D$2:$D$400,MATCH(MAX(('Master order sheet.xlsx'!$U$2:$U$400=$N2)*('Master order sheet.xlsx'!$D$2:$D$400)),(('Master order sheet.xlsx'!$U$2:$U$400=$N2)*('Master order sheet.xlsx'!$D$2:$D$400)),0)),""),"")

    enter BOTH with Ctrl+Shift+Enter then copy (drag) down columns.

    Many product codes are not on the Master.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    10-08-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Returning the last price paid and the date is was bought. THE ANSWER MUST BE OUT THERE

    Works perfectly. Thanks!

+ 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] Return highest price paid row by part by customer
    By rs1aj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-03-2015, 03:46 PM
  2. [SOLVED] Finding "last price" paid for multiple receipts in a large set of data
    By Rim2Rim in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-24-2014, 12:01 AM
  3. [SOLVED] Secondary Loan Pricing Calculation (price of loan being bought/sold)
    By Romsky in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2013, 07:02 PM
  4. Replies: 3
    Last Post: 01-03-2013, 12:32 AM
  5. Replies: 4
    Last Post: 08-15-2012, 09:49 AM
  6. Last Price Paid: VLoopup? Index/Match?
    By Excellerant in forum Excel General
    Replies: 4
    Last Post: 06-26-2012, 12:29 PM
  7. Formula sometimes returning correct answer and sometimes returning 0
    By redimp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-09-2010, 06:28 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