Second to last order by client ID

UserI

New Member
Joined
Mar 16, 2022
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hi,

A have a list with different clients with their orders effective date and the items they purchased. Each client is in the file at least 2-3 times.

Column A = client ID
Column B = order effective date
Column C = item

Based on this data, I need to have in another sheet unique client IDs, each with their second to last order.
What formula can help with this task?

Thank you for your help.
Regards.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Can you post some sample data & expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
You need to select the range of cells, not just one. ;)
 
Upvote 0
You need to select the range of cells, not just one. ;)
Client data.xlsx
ABC
1Customer IDOrder dateItem
2C20001-03-21Printer paper
3C20102-03-21Three-hole punched paper
4C20103-03-21Graph paper
5C20104-03-21Tracing paper
6C20105-03-21Carbon paper
7C20203-03-21Color card stock
8C20304-03-21Heavy-duty card stock
9C20405-03-21Wrapping paper
10C20506-03-21Greeting cards and envelopes
11C20607-03-21Business cards
12C20508-03-21Color card stock
13C20609-03-21Heavy-duty card stock
14C21110-03-21Wrapping paper
15C20708-03-21Letterhead
16C20809-03-21Poster board
17C20910-03-21Letterhead
18C21011-03-21Letterhead
19C21112-03-21Letterhead
20C21213-03-21Poster board
21C21314-03-21Graph paper
22C21415-03-21Tracing paper
23C21516-03-21Carbon paper
24C21617-03-21Graph paper
25C21718-03-21Tracing paper
Data
 
Upvote 0
Thanks for that.
How about
Fluff.xlsm
ABCDEFGH
1Customer IDOrder dateItem
2C20001/03/2021Printer paperC200Printer paper
3C20002/03/2021Three-hole punched paperC201Tracing paper
4C20103/03/2021Graph paperC202Heavy-duty card stock
5C20104/03/2021Tracing paperC205Greeting cards and envelopes
6C20105/03/2021Carbon paperC206Business cards
7C20203/03/2021Color card stockC211Wrapping paper
8C20204/03/2021Heavy-duty card stockC207Poster board
9C20205/03/2021Wrapping paperC210Poster board
10C20506/03/2021Greeting cards and envelopesC213Graph paper
11C20607/03/2021Business cardsC214Tracing paper
12C20508/03/2021Color card stock
13C20609/03/2021Heavy-duty card stock
14C21110/03/2021Wrapping paper
15C20708/03/2021Letterhead
16C20709/03/2021Poster board
17C20710/03/2021Letterhead
18C21011/03/2021Letterhead
19C21112/03/2021Letterhead
20C21013/03/2021Poster board
21C21314/03/2021Graph paper
22C21415/03/2021Tracing paper
23C21316/03/2021Carbon paper
24C21417/03/2021Graph paper
25C21018/03/2021Tracing paper
26
Master
Cell Formulas
RangeFormula
G2:G11G2=UNIQUE(FILTER(A2:A100,A2:A100<>""))
H2:H11H2=CHOOSEROWS(FILTER($C$2:$C$100,$A$2:$A$100=G2),-2)
Dynamic array formulas.
 
Upvote 0
Thanks for that.
How about
Fluff.xlsm
ABCDEFGH
1Customer IDOrder dateItem
2C20001/03/2021Printer paperC200Printer paper
3C20002/03/2021Three-hole punched paperC201Tracing paper
4C20103/03/2021Graph paperC202Heavy-duty card stock
5C20104/03/2021Tracing paperC205Greeting cards and envelopes
6C20105/03/2021Carbon paperC206Business cards
7C20203/03/2021Color card stockC211Wrapping paper
8C20204/03/2021Heavy-duty card stockC207Poster board
9C20205/03/2021Wrapping paperC210Poster board
10C20506/03/2021Greeting cards and envelopesC213Graph paper
11C20607/03/2021Business cardsC214Tracing paper
12C20508/03/2021Color card stock
13C20609/03/2021Heavy-duty card stock
14C21110/03/2021Wrapping paper
15C20708/03/2021Letterhead
16C20709/03/2021Poster board
17C20710/03/2021Letterhead
18C21011/03/2021Letterhead
19C21112/03/2021Letterhead
20C21013/03/2021Poster board
21C21314/03/2021Graph paper
22C21415/03/2021Tracing paper
23C21316/03/2021Carbon paper
24C21417/03/2021Graph paper
25C21018/03/2021Tracing paper
26
Master
Cell Formulas
RangeFormula
G2:G11G2=UNIQUE(FILTER(A2:A100,A2:A100<>""))
H2:H11H2=CHOOSEROWS(FILTER($C$2:$C$100,$A$2:$A$100=G2),-2)
Dynamic array formulas.
Thank you.
What would be the formula if I need the second to last order date for each client?
 
Upvote 0
Do you mean like
Fluff.xlsm
ABCDEFGHI
1Customer IDOrder dateItem
2C20001/03/2021Printer paperC20001/03/2021Printer paper
3C20002/03/2021Three-hole punched paperC20104/03/2021Tracing paper
4C20103/03/2021Graph paperC20204/03/2021Heavy-duty card stock
5C20104/03/2021Tracing paperC20506/03/2021Greeting cards and envelopes
6C20105/03/2021Carbon paperC20607/03/2021Business cards
7C20203/03/2021Color card stockC21110/03/2021Wrapping paper
8C20204/03/2021Heavy-duty card stockC20709/03/2021Poster board
9C20205/03/2021Wrapping paperC21013/03/2021Poster board
10C20506/03/2021Greeting cards and envelopesC21314/03/2021Graph paper
11C20607/03/2021Business cardsC21415/03/2021Tracing paper
12C20508/03/2021Color card stock
13C20609/03/2021Heavy-duty card stock
14C21110/03/2021Wrapping paper
15C20708/03/2021Letterhead
16C20709/03/2021Poster board
17C20710/03/2021Letterhead
18C21011/03/2021Letterhead
19C21112/03/2021Letterhead
20C21013/03/2021Poster board
21C21314/03/2021Graph paper
22C21415/03/2021Tracing paper
23C21316/03/2021Carbon paper
24C21417/03/2021Graph paper
25C21018/03/2021Tracing paper
26
Master
Cell Formulas
RangeFormula
G2:G11G2=UNIQUE(FILTER(A2:A100,A2:A100<>""))
H2:I11H2=CHOOSEROWS(FILTER($B$2:$C$100,$A$2:$A$100=G2),-2)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,410
Messages
6,124,756
Members
449,187
Latest member
hermansoa

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