Top 10 Value in a date range with multiple criteria

conorrey

New Member
Joined
Sep 27, 2010
Messages
43
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have been trying to work out a formula to find a specific value in a large range of data.

I need to find our top 10 RES between a date range between another date range and return the RES number.

I will then use index match to get the whole row of date to create a top 10 list.

Below is the sample data with criteria.

I have tried using Max, Large and Aggregate formulas but I cannot add the date range. It just looks at the whole range

Any help would be great.

ArrivalRes #TOTALStatusCreated
01/09/202322356710000.00Waitlist02/01/2023
30/09/2023223597124.67Departed03/01/2023
03/01/2023223598232.60Departed03/04/2023
13/05/2023223625702.95Departed03/08/2023
05/01/2023223660423.35Departed03/11/2023
05/01/2023223663343.61Departed03/10/2023
29/03/20232237121938.33Cancelled20/11/2023
29/03/20232237135242.29Cancelled20/10/2023
15/09/2023223770435.78Waitlist21/01/2023
18/01/20232237711304.37Waitlist21/01/2023
10/01/202322378968.28Departed20/10/2023
08/03/20232237961794.36Departed07/12/2023
11/01/20232237970.00Departed06/11/2023
06/01/2023223799225.11Departed10/07/2023
18/09/20232238021473.12Cancelled20/01/2023
Created
01/01/2023​
30/04/2023​
Arrival
01/09/2023​
30/09/2023​
StatusWaitlist
TotalMaxTop 10
ResultColumn D
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi
I use Microsoft® Excel® for Microsoft 365 MSO (Version 2308 Build 16.0.16731.20182) 64-bit.

Conor
 
Upvote 0
I use Microsoft® Excel® for Microsoft 365 MSO (Version 2308 Build 16.0.16731.20182) 64-bit.

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
Hi, Thanks I have done that now.
 
Upvote 0
Thanks for that.
How about
Fluff.xlsm
ABCDE
1ArrivalRes #TOTALStatusCreated
201/09/202322356710000Waitlist02/01/2023
330/09/2023223597124.67Departed03/01/2023
403/01/2023223598232.6Departed03/04/2023
513/05/2023223625702.95Departed03/08/2023
605/01/2023223660423.35Departed03/11/2023
705/01/2023223663343.61Departed03/10/2023
829/03/20232237121938.33Cancelled20/11/2023
929/03/20232237135242.29Cancelled20/10/2023
1015/09/2023223770435.78Waitlist21/01/2023
1118/01/20232237711304.37Waitlist21/01/2023
1210/01/202322378968.28Departed20/10/2023
1308/03/20232237961794.36Departed07/12/2023
1411/01/20232237970Departed06/11/2023
1506/01/2023223799225.11Departed10/07/2023
1618/09/20232238021473.12Cancelled20/01/2023
17
18
19Created01/01/202330/04/2023
20Arrival01/09/202330/09/2023
21StatusWaitlist
22TotalMax10
23Result
2401/09/202322356710000Waitlist02/01/2023
2515/09/2023223770435.78Waitlist21/01/2023
26
Sheet6
Cell Formulas
RangeFormula
A24:E25A24=TAKE(SORT(FILTER(A2:E16,(A2:A16>=B20)*(A2:A16<=C20)*(E2:E16>=B19)*(E2:E16<=C19)*(D2:D16=B21)),3,-1),C22)
Dynamic array formulas.
 
Upvote 0
Solution
Hi,

I tried to use that formula but I am getting a #calc error.

Below is the formula i use

=TAKE(SORT(FILTER(A2:P10000,(A2:A10000>=S11)*(A2:A10000<=T11)*(P2:P10000>=S10)*(P2:P10000<=T10)*(O2:O10000=S12)),3,-1),T13)

any help would be great
RangeA2:P10000
Column PCreated
01/01/2023​
31/12/2023​
Column AArrival
01/01/2023​
31/12/2023​
Column OStatusWaitlist
TotalMax
10​
Result
#CALC!​
#CALC!​
#CALC!​
 
Upvote 0
The error suggests that you don't have any data that meets all the criteria.
 
Upvote 0
The error suggests that you don't have any data that meets all the criteria.
Thanks. i have adjusted the formula now to the correct range and it works perfect. Thanks for your help
 
Upvote 0
The error suggests that you don't have any data that meets all the criteria.
HI, the formula is picking up the max value in Column A ( a Date). how do I get it to pick the largest/max number in column L.

Below is my wokring formula but it is picking the largest date

=TAKE(SORT(FILTER('Current Week'!A:P,('Current Week'!A:A>=D86)*('Current Week'!A:A<=E86)*('Current Week'!P:P>=D85)*('Current Week'!P:P<=E85)*('Current Week'!O:O=D87)),3,-1),E88)

Any help would be great
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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