look up maximum value in range and return corresponding values in another column

junkforhr

Board Regular
Joined
Dec 16, 2009
Messages
115
Office Version
  1. 365
Platform
  1. Windows
I have a dataset (see sample below). What I'm looking to do is return in one cell where the highest unique count is the same for different periods. I have found the below array formula, but would prefer not use this, as the actual data will be quite large.

Excel Formula:
=IFERROR(INDEX($J$8:$J$500, SMALL(IF(LARGE($H$8:$H$500,1)=$H$8:$H$500, ROW($H$8:$H$500)-ROW($H$8)+1), ROW(1:1))),"" )


Desired outcome in cell K3:
11/04/2023, 21/04/2023, 25/04/2023, 05/05/2023



Unique Countperiod
35​
11/04/2023​
12​
11/04/2023​
29​
12/04/2023​
27​
13/04/2023​
16​
14/04/2023​
33​
17/04/2023​
29​
18/04/2023​
22​
19/04/2023​
19​
20/04/2023​
35​
21/04/2023​
27​
24/04/2023​
35​
25/04/2023​
12​
26/04/2023​
30​
27/04/2023​
29​
28/04/2023​
10​
29/04/2023​
30​
30/04/2023​
27​
1/05/2023​
21​
2/05/2023​
15​
3/05/2023​
22​
4/05/2023​
35​
5/05/2023​
34​
6/05/2023​
18​
7/05/2023​
12​
8/05/2023​
8​
9/05/2023​
2​
10/05/2023​
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Pardon my excel skills. Would it not be better to do this on a new sheet.

=unique( Entire column for Period)

=MAX(IF(B:B= {unique date provided from formula above}, A:A))
 
Upvote 0
How about
Fluff.xlsm
HIJK
1
2
311/04/2023
421/04/2023
525/04/2023
605/05/2023
7Unique Countperiod 
83511/04/2023
91211/04/2023
102912/04/2023
112713/04/2023
121614/04/2023
133317/04/2023
142918/04/2023
152219/04/2023
161920/04/2023
173521/04/2023
182724/04/2023
193525/04/2023
201226/04/2023
213027/04/2023
222928/04/2023
231029/04/2023
243030/04/2023
252701/05/2023
262102/05/2023
271503/05/2023
282204/05/2023
293505/05/2023
303406/05/2023
311807/05/2023
321208/05/2023
33809/05/2023
34210/05/2023
Master
Cell Formulas
RangeFormula
K3:K7K3=IFERROR(AGGREGATE(15,6,$J$8:$J$500/($H$8:$H$500=MAX($H$8:$H$500)),ROWS(K$3:K3)),"")
 
Upvote 1
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

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