Return multiple dates if coulmn header meets values in another cell

junkforhr

Board Regular
Joined
Dec 16, 2009
Messages
115
Office Version
  1. 365
Platform
  1. Windows
Hi,

I currently have this formula: =TEXTJOIN(",",,FILTER(TEXT(Daily_Data!$C$5:$C$5000,"dd/mm/yyyy"),Daily_Data!F5:F5000=LARGE(Daily_Data!F5:F5000,2)))&"."

Now this works fine, in that it will return the dates for the highest number in column F.

What I'm after is to have the value of "Header1" in cell A2 and then look up the table and return the dates of 11/04/2023,18/04/2023 and 05/05/2023. Then have the ability to copy the formula down, so in cell A3 the value of "Header2" would be in that cell and the result would be 13/04/2023,24/04/2023.

Row LabelsHeader1Header2Header3Header4Header5Header6Header7Header8Grand Total
11/04/2023
13​
18​
6​
7​
1​
45​
12/04/2023
7​
2​
14​
5​
3​
2​
33​
13/04/2023
7​
3​
9​
4​
5​
1​
29​
14/04/2023
2​
5​
2​
8​
17​
17/04/2023
7​
1​
17​
4​
6​
3​
38​
18/04/2023
13​
1​
14​
2​
3​
1​
34​
19/04/2023
4​
1​
16​
8​
3​
32​
20/04/2023
6​
2​
7​
3​
1​
19​
21/04/2023
10​
1​
10​
3​
4​
28​
24/04/2023
5​
3​
9​
8​
5​
1​
31​
26/04/2023
4​
15​
2​
7​
1​
2​
31​
27/04/2023
5​
7​
1​
2​
1​
1​
17​
28/04/2023
7​
11​
1​
6​
1​
26​
1/05/2023
11​
1​
17​
2​
8​
39​
2/05/2023
9​
15​
1​
5​
30​
3/05/2023
5​
14​
2​
3​
24​
4/05/2023
7​
1​
12​
7​
3​
1​
31​
5/05/2023
13​
12​
1​
2​
28​
8/05/2023
6​
6​
8​
5​
1​
1​
27​
9/05/2023
4​
14​
1​
3​
22​
10/05/2023
12​
1​
4​
3​
8​
28​
11/05/2023
5​
1​
9​
2​
17​
12/05/2023
4​
9​
2​
5​
20​
15/05/2023
6​
19​
3​
8​
1​
2​
39​
16/05/2023
6​
12​
2​
2​
1​
1​
24​
17/05/2023
8​
1​
14​
2​
1​
26​
18/05/2023
12​
15​
4​
12​
43​
19/05/2023
11​
7​
8​
12​
5​
43​
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
See if this does what you are after.

20230726 Filter with Match junkforhr.xlsx
AB
1Header111/04/2023,18/04/2023,05/05/2023.
2Header213/04/2023,24/04/2023.
Notes
Cell Formulas
RangeFormula
B1:B2B1=LET(intValues,INDEX(Daily_Data!$C$5:$L$5000,0,MATCH($A1,Daily_Data!$C$4:$L$4,0)), TEXTJOIN(",",,FILTER(TEXT(Daily_Data!$C$5:$C$5000,"dd/mm/yyyy"),intValues=LARGE(intValues,2)))&".")
Named Ranges
NameRefers ToCells
Daily_Data!_FilterDatabase=Daily_Data!$C$4:$L$32B1:B2
 
Upvote 1
Solution
See if this does what you are after.

20230726 Filter with Match junkforhr.xlsx
AB
1Header111/04/2023,18/04/2023,05/05/2023.
2Header213/04/2023,24/04/2023.
Notes
Cell Formulas
RangeFormula
B1:B2B1=LET(intValues,INDEX(Daily_Data!$C$5:$L$5000,0,MATCH($A1,Daily_Data!$C$4:$L$4,0)), TEXTJOIN(",",,FILTER(TEXT(Daily_Data!$C$5:$C$5000,"dd/mm/yyyy"),intValues=LARGE(intValues,2)))&".")
Named Ranges
NameRefers ToCells
Daily_Data!_FilterDatabase=Daily_Data!$C$4:$L$32B1:B2
Perfect! Thank you.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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