Average weekday - excluding days with 0

Marklarbear

Board Regular
Joined
Nov 6, 2003
Messages
112
Office Version
  1. 365
Platform
  1. Windows
Hi guys

I have the following array formula which works a treat for me:

{=AVERAGE(IF(WEEKDAY($O$4:$O$34)=6,$P$4:$P$34))}

(averages Fridays within a given date range)

What I want to do now is to modify the formula to exclude any Friday that has a 0 value or no value at all..... I'm thinking it's an "AVERAGEIF" but I'm struggling to crack it...

As always - any help is greatly appreciated!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Try
Test.xlsx
NOP
12
2
3
44/23/20211
54/24/202199
64/25/202199
74/26/202199
84/27/202199
94/28/202199
104/29/202199
114/30/20210
125/1/202199
135/2/202199
145/3/202199
155/4/202199
165/5/202199
175/6/202199
185/7/2021
195/8/202199
205/9/202199
215/10/202199
225/11/202199
235/12/202199
245/13/202199
255/14/20212
265/15/202199
275/16/202199
285/17/202199
295/18/202199
305/19/202199
315/20/202199
325/21/20213
Sheet1
Cell Formulas
RangeFormula
N1N1=AVERAGE(IF((WEEKDAY($O$4:$O$32)=6)*($P$4:$P$32<>0),$P$4:$P$32))
 
Upvote 0
Try
Test.xlsx
NOP
12
2
3
44/23/20211
54/24/202199
64/25/202199
74/26/202199
84/27/202199
94/28/202199
104/29/202199
114/30/20210
125/1/202199
135/2/202199
145/3/202199
155/4/202199
165/5/202199
175/6/202199
185/7/2021
195/8/202199
205/9/202199
215/10/202199
225/11/202199
235/12/202199
245/13/202199
255/14/20212
265/15/202199
275/16/202199
285/17/202199
295/18/202199
305/19/202199
315/20/202199
325/21/20213
Sheet1
Cell Formulas
RangeFormula
N1N1=AVERAGE(IF((WEEKDAY($O$4:$O$32)=6)*($P$4:$P$32<>0),$P$4:$P$32))
WORKS BRILLIANTLY!!!!
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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