Average if weekday

bhorvati

New Member
Joined
Aug 27, 2009
Messages
8
Need formula to average numbers for weekdays Mon-Fri.
Need formula to average number for weekday Sat-Sun.

Column A = Dates
Column B = Data
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Does this work for you?

Excel Workbook
AB
1DateValue
220-Jan-1232
321-Jan-1257
424-Jan-129
525-Jan-1247
627-Jan-1251
727-Jan-1213
827-Jan-1288
928-Jan-1286
1030-Jan-1235
1131-Jan-1253
1201-Feb-1276
1302-Feb-1262
1404-Feb-129
1509-Feb-1264
1609-Feb-1280
1710-Feb-1257
1811-Feb-1285
1911-Feb-1224
2012-Feb-1235
2116-Feb-1215
22
23Weekdays48.7
24Weekends49.3
Sheet1
Excel 2007
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}. Note: Do not try and enter these manually yourself


Regards
Adam
 
Upvote 0
Sumproduct approach (if you want to avoid CSE formulas)

=SUMPRODUCT(--(WEEKDAY($A$2:$A$20,2)<6),$B$2:$B$20)/SUMPRODUCT(--(WEEKDAY($A$2:$A$20,2)<6))

=SUMPRODUCT(--(WEEKDAY($A$2:$A$20,2)>5),$B$2:$B$20)/SUMPRODUCT(--(WEEKDAY($A$2:$A$20,2)>5))
 
Upvote 0
You can also use AVERAGE function, for example

=AVERAGE(IF(WEEKDAY(A2:A100,2)< 6,B2:B100))

confirmed with CTRL+SHIFT+ENTER
 
Upvote 0

Forum statistics

Threads
1,214,877
Messages
6,122,051
Members
449,064
Latest member
scottdog129

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