Forum Discussion
Skeletor35
Jul 21, 2023Copper Contributor
Why is this failing?
=AVERAGE(IF(D3:J3<>0 AND D3:J3<>"",D3:J3,""))
Trying to get an average for d3:j3, if zero or blank do not average, if "pto" use 9 instead.
Started with bing failed every time, straight quotes, not, etc. Bard same thing. How do i accomplish this function?
the ss was an attempt to just get the average to work without the pto exception.
thanks in advance!
Skeletor35 This one if you also want to take the "pto" into account:
=AVERAGE(IF(D3:J3<>"pto",IF(D3:J3<>0,D3:J3,""),9))
3 Replies
Sort By
- Riny_van_EekelenPlatinum Contributor
Skeletor35 This one if you also want to take the "pto" into account:
=AVERAGE(IF(D3:J3<>"pto",IF(D3:J3<>0,D3:J3,""),9))
- Skeletor35Copper Contributor
Thank you sirs!! I greatly appreciate your help on this matter! They both work perfectly! Thanks again
- Harun24HRBronze Contributor
Skeletor35 If you are on older version of Excel then use below formula as array entry.
=AVERAGE(IF(D3:J3<>"",D3:J3,""))
Array entry means, after putting formula to cell, press CTRL+SHIFT+ENTER as the same time.
For newer version use AVERAGEIF() function.
=AVERAGEIF(D3:J3,"<>",D3:J3)