Using the LARGE function conditionally

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,046
Ihave a column (A) with days of the week in and column B with sales figures.

I need to use the LARGE function to work out what the 1st, 2nd etc etc largest sales days are based on the day of the week. So the best Monday, the best Tuesday and so on. does anyone have any ideas on this ?

Thanks

Paul
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
=LARGE(IF(WEEKDAY(A1:A40)=2,B1:B40),1)

The bolded 2 is the number to indicate Weekday.
1=Sun
2=Mon
etc..

Bolded 1 is the # to change for nth largest..

Formula Confirmed with CTRL + SHIFT + ENTER
 

Brian from Maui

MrExcel MVP
Joined
Feb 16, 2002
Messages
8,459
Ihave a column (A) with days of the week in and column B with sales figures.

I need to use the LARGE function to work out what the 1st, 2nd etc etc largest sales days are based on the day of the week. So the best Monday, the best Tuesday and so on. does anyone have any ideas on this ?

Thanks

Paul

Are the days of the week true date values?
 

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,046
Hi there Jonmo, I have tried this with minor modification

LARGE(IF(WEEKDAY('2006-2007'!BS$4:BS$1500)=2,'2006-2007'!CV$4:CV$1500),ROW(A2)-ROW(A$1))

then confirming with Ctrl + **** + Enter

but I get a #VALUE error ??
 

Pauljj

Well-known Member
Joined
Mar 28, 2004
Messages
2,046
Sorry this does work, for some reason my calculations are all very slow, I think its because I have a lot of arrays on the sheet


many thanks for you help

Paul
 

Forum statistics

Threads
1,181,412
Messages
5,929,784
Members
436,692
Latest member
ModestMuse

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
Top