LARGE Function using a date range

SarahR2908

New Member
Joined
Jan 20, 2020
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Im trying to show the Top 5 performers within a date range using the units per hour (column G)
At the moment im using the following formula (for first place) which gives the answer i need but you have to manually put in the date range.
=LARGE('Sheet 1'!$G$2:$G$60,1)
I want the user to be able to put in the to and from dates in cells B1 and D1 on another tab and the formula uses these dates to then calculate the largest within that period.

Ive tried to use a formula adapted from a MAX function but this doesnt work.
=LARGE(IF(('Sheet 1'!$B$2:$B$15000<=D1)*('Sheet 1'!$B$2:$B$15000>=B1),'Sheet 1'!$G$2:$G$15000,""))

Can anyone help?

1579513448329.png
 

Attachments

  • 1579513708195.png
    1579513708195.png
    6 KB · Views: 15

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
something like this?

Book1
ABCDEF
1Dateper Hrs11/01/202012/01/2020
210/01/20201511315
310/01/20201922312
410/01/20201983309
510/01/20202014297
610/01/20201935275
710/01/202058
810/01/2020337
910/01/202065
1010/01/202054
1110/01/202087
1211/01/2020275
1311/01/2020235
1411/01/2020312
1511/01/2020154
1611/01/2020213
1711/01/202052
1811/01/2020182
1911/01/2020264
2011/01/2020184
2111/01/2020221
2212/01/2020315
2312/01/2020214
2412/01/2020252
2512/01/2020309
2612/01/2020173
2712/01/202092
2812/01/2020297
2912/01/2020149
3012/01/202058
3112/01/2020228
Sheet6
Cell Formulas
RangeFormula
E2:E6E2=SUMPRODUCT(LARGE(($A$2:$A$31>=$E$1)*($A$2:$A$31<=$F$1)*($B$2:$B$31),$D2))
B2:B31B2=RANDBETWEEN(50,350)
 
Upvote 0
Instead of D2 in this formula above use ROW()-1 and you do not need numbers in col. D.
 
Upvote 0
Thanks for your help. I just seem to be getting 0
Formula: =SUMPRODUCT(LARGE(('Sheet1'!$B$2:$B$15000>=$B$1)*('Sheet1'!$B$2:$B$15000<=$D$1)*('Sheet1'!$G$2:$G$15000),A5))

Have i missed something?
On sheet 1 column B is the dates, Column G is the no of units


1579516393419.png
 
Upvote 0
it looks ok, try to cut down the ranges to see what you get

=SUMPRODUCT(LARGE(('Sheet1'!$B$2:$B$15>=$B$1)*('Sheet1'!$B$2:$B$15<=$D$1)*('Sheet1'!$G$2:$G$15),A5))
 
Upvote 0
:-) OMG just realised i put 2019 in the criteria but this is for data from 2020.
No wonder i was getting 0

Its all working now!
Thank you
 
Upvote 0
i missed that as well,
glad that work out for you
 
Upvote 0
Can i use this formula amending LARGE for SMALL so i can get the bottom 5 performers?
Assuming i need to amend something else as just changing it gives me 0
=SUMPRODUCT(SMALL(('UNIT SCAN'!$B$2:$B$15>=$B$1)*('UNIT SCAN'!$B$2:$B$15<=$D$1)*('UNIT SCAN'!$G$2:$G$15),F5))
 
Upvote 0
the SMALL() function should work as long as you don't have any empty cells within the Col G range
 
Upvote 0
I've checked and no empty cells but still only bringing back 0
do i still use 1, 2, 3 as in the order?
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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