Finding first, second, third matches

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
I need help where I have an identifier I am using in INDEX-MATCH, but this may appear more than once. The IDs wont be consecutive rows, and culd be anywhere over the space of 10000+ roes

Data
IDStart DateEnd Date
1234501/01/2308/01/23
1234512/12/2314/12/23
1357914/01/2331/01/23
1470202/03/2308/02/23
1470208/08/2309/09/23
1234501/01/2404/03/24

Output

IDStart Date1End Date1Start Date2End Date2Start Date3End Date3
1234501/01/2308/01/2312/12/2314/12/2301/01/2404/03/24
1357914/01/2331/01/23
1470202/03/2308/02/2308/08/2309/09/23
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
MrExcelPlayground22.xlsx
ABCDEFG
1IDStart DateEnd Date
2123451/1/20231/8/2023
31234512/12/202312/14/2023
4135791/14/20231/31/2023
5147023/2/20232/8/2023
6147028/8/20239/9/2023
7123451/1/20243/4/2024
8
9
10IDStart Date 1End Date 1Start Date 2End Date 2Start Date 3End Date 3
11123451/1/20231/8/202312/12/202312/14/20231/1/20243/4/2024
12135791/14/20231/31/2023
13147023/2/20232/8/20238/8/20239/9/2023
Sheet5
Cell Formulas
RangeFormula
A11:A13A11=UNIQUE(A2:A7)
B11:G11,B13:E13,B12:C12B11=TOROW(TAKE(FILTER(B2:C7,A2:A7=A11),3),0)
Dynamic array formulas.


I don't sort this here, you may want some sort for the first 3 - maybe the data entry order is always right, so no sort is needed.
 
Upvote 1
Solution
try this
-------------------
multiple posts solutions-v3.xlsm
ABCDEFGHIJK
1IDStart DateEnd DateIDStart Date 1End Date 1Start Date 2End Date 2Start Date 3End Date 3
2123451/1/20238/1/2023123451/1/20238/1/20231/1/20243/4/202412/12/202312/14/2023
3135791/14/20231/31/2023135791/14/20231/31/2023
4147022/3/20232/8/2023147022/3/20232/8/20238/8/20239/9/2023
5147028/8/20239/9/2023
6123451/1/20243/4/2024
71234512/12/202312/14/2023
1,2,3 matches
Cell Formulas
RangeFormula
E2:E4E2=UNIQUE(A2:A7)
F2:K2,F4:I4,F3:G3F2=TOROW(FILTER($B$2:$C$7,E2=$A$2:$A$7))
Dynamic array formulas.
 
Upvote 1

Forum statistics

Threads
1,215,339
Messages
6,124,381
Members
449,155
Latest member
ravioli44

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