We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide

Help with an excel formula

Hi All

I'm in work, trying to sort through some figures for our head office & I have a dataset which lists all the sales of our parts for the year. There are multiple entries for each part as they have been sold one more than one occasion. The dataset consists around 2500 rows...

HO want a report which shows the last selling date for each part. I have (in another worksheet) taken all the parts & removed duplicates, but what I now need to do is run a lookup (or something similar) to shift through the original data to find the last selling date, is this possible?

Thanks
Dwy galon, un dyhead,
Dwy dafod ond un iaith,
Dwy raff yn cydio’n ddolen,
Dau enaid ond un taith.

Comments

  • Are the separate dates of sale spread over columns B, C, D etc or all concatenated together in one cell in column B (assume part # is in column A)?
  • Oakdene
    Oakdene Posts: 2,560 Forumite
    1,000 Posts Combo Breaker
    Are the separate dates of sale spread over columns B, C, D etc or all concatenated together in one cell in column B (assume part # is in column A)?

    They are in one column, e.g.:

    Part Selling Date
    ABC 01/10/17
    DEF 02/05/17
    ABC 30/10/17
    ABC 29/04/17
    DEF 04/04/17

    So basically I would like to run it so that it would show
    ABC 30/10/17
    DEF 02/05/17
    Dwy galon, un dyhead,
    Dwy dafod ond un iaith,
    Dwy raff yn cydio’n ddolen,
    Dau enaid ond un taith.
  • Tom99
    Tom99 Posts: 5,371 Forumite
    1,000 Posts Second Anniversary
    can you sort the column by date then use vlookup to find the 1st entry?
  • Insert a PivotTable, define Rows as Part and Values as Maximum Selling Date, format latter as date.
  • Twopints
    Twopints Posts: 1,776 Forumite
    Part of the Furniture 1,000 Posts Combo Breaker
    Probably need to split the data into 2 columns first - use Text to columns (on data tab) to split it
    Not even wrong
  • Oakdene
    Oakdene Posts: 2,560 Forumite
    1,000 Posts Combo Breaker
    Insert a PivotTable, define Rows as Part and Values as Maximum Selling Date, format latter as date.

    Star man, didn't think of that!! Thank you all.
    Dwy galon, un dyhead,
    Dwy dafod ond un iaith,
    Dwy raff yn cydio’n ddolen,
    Dau enaid ond un taith.
  • Oakdene
    Oakdene Posts: 2,560 Forumite
    1,000 Posts Combo Breaker
    Ok, so now I need a little bit more help & I dont think the pivot table is going to let me do this...

    I now need to show the last purchase price of the parts:


    Part Selling Date Price
    ABC 01/10/17 £25.01
    DEF 02/05/17 £17.64
    ABC 30/10/17 £24.99
    ABC 29/04/17 £26.42
    DEF 04/04/17 £18.01

    So basically I would like to run it so that it would show
    ABC 30/10/17 £24.99
    DEF 02/05/17 £17.64

    The trouble is the price count on the pivot table is set to max (as per the date count) but I need it to be the price on the last date if that makes sense.
    Dwy galon, un dyhead,
    Dwy dafod ond un iaith,
    Dwy raff yn cydio’n ddolen,
    Dau enaid ond un taith.
  • WaywardDriver
    WaywardDriver Posts: 546 Forumite
    Seventh Anniversary 500 Posts
    edited 14 November 2017 at 1:30PM
    Use Data-Text to Columns to have Part in column A, Selling Date in B, Price in C.
    In D2 enter formula =A2&B2 and copy down column.
    Insert PivotTable as before in F1 say.
    In H2 enter formula =INDIRECT("C" & MATCH(F2&G2,D:D,0)) and copy down column.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 353.5K Banking & Borrowing
  • 254.1K Reduce Debt & Boost Income
  • 455K Spending & Discounts
  • 246.6K Work, Benefits & Business
  • 602.9K Mortgages, Homes & Bills
  • 178.1K Life & Family
  • 260.6K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.