How can I find the last instance of each unique item (in column), display only those columns?

fitzchivalry

New Member
Joined
Mar 23, 2015
Messages
33
I have a spreadsheet as follows:

DateCustomerOrder DetailOrder ID
01/01/2015JohnEggs1
02/01/2015SimonBeans2
03/01/2015AnnaToast3
04/01/2015SineadToast4
05/01/2015AndrewToast5
06/01/2015CarolineEggs6
07/01/2015BillSausages7
08/01/2015LeanneMushrooms8
09/01/2015MikeToast9
10/01/2015SarahTea10
01/02/2015NicholasSausages11
02/02/2015JohnBacon12
03/02/2015MikeSausages13
04/02/2015SineadEggs14
05/02/2015LeanneSausages15
06/02/2015BillEggs16
07/02/2015SimonToast17
08/02/2015JohnEggs18
09/02/2015AnnaSausages19
10/02/2015AnnaToast20
01/03/2015MikeSausages21
02/03/2015SineadSausages22
03/03/2015PeterEggs23
04/03/2015Gabi:)24
05/03/2015MohammedSausages25
06/03/2015KarenToast26
07/03/2015JohnMushrooms27
08/03/2015LeanneMushrooms28
09/03/2015PeterEggs29

<tbody>
</tbody>

Didn't really need that 3rd column. Anyway.

I have a spreadsheet like this and would like to somehow pull just the last mention of each Customer, so I can see when they last ordered, and display these in another table, which could be called most recent order.

Would it require scripting or can this be done with VLOOKUP or something? I'm going to carry on looking for a solution, but this isn't my area of expertise.

I'm continuing to try and figure this out myself, but am a bit stuck so hoping to be pointed in the right direction.

Am currently looking up how to find unique values, thinking that might be the first step.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
assuming you have a list of unique customers already than

=LOOKUP(2,1/($B$2:$B$30=F2),$A$2:$A$30)

where column B are the customers and column A are the dates.

F2 would hold the first unique customers name.
 
Upvote 0
Thank you, sorry for my ridiculously late response.

I read your reply not long after you posted it, and tried to get the same to work in OpenOffice, to no avail. I just get =DIV/0.

I didn't mention I'm using OpenOffice before because for my reasoning, that's my problem and this is an Excel forum not OpenOffice forum.

=INDEX(A1:A100,MATCH(A1,D1:D100,0))

Along with some instructions to goto the sheet in question and make sure each row has a corresponding number, then sort descending, come back to the sheet I'm using that formula on and sort the results descending. And then press Ctrl+Z until the sheet containing the data is back in the correct order.

Suggestions welcome, I've given up trying to make this better on my own (I've tried stuff involving IFERROR, MAX, IF, INDEX, LOOKUP, today, and this is the closest I've gotten. I remember doing something else weeks ago that worked better than my current solution, but I can't remember what it was and I still had to reverse the order of the cells manually!).
 
Upvote 0

Forum statistics

Threads
1,215,517
Messages
6,125,288
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top