Calculating an Average but ignore cells with no data yet

DentonHTHS

New Member
Joined
Jul 3, 2008
Messages
39
Hi,
I am working a sheet to average students weekly marks but would like to be able to give them their current mark and have excel ignore the assignment cells that don't have marks yet. This is what I have so far. I think it's an IF statement but not sure how to work it out completely.

Here's the formula I have so far.

=AVERAGE(D4,L4,T4,AB4,AJ4,AR4,AZ4,BH4,BP4,BX4,CF4,CN4,CV4,DD4,DL4,DT4,EB4,EJ4)

Thanks for any help. :)
 
However it is returning a #Value! error

=AVERAGEIFS($D4:$EJ4,$D4:$EJ4,"<>0",$D$2:$DJ$2,"Grade for week")

All the ranges need to be the same size (that was my bad in my post..)
Try
=AVERAGEIFS($D4:$EJ4,$D4:$EJ4,"<>0",$D$2:$EJ$2,"Grade for week")
 
Upvote 0
All the ranges need to be the same size (that was my bad in my post..)
Try
=AVERAGEIFS($D4:$EJ4,$D4:$EJ4,"<>0",$D$2:$EJ$2,"Grade for week")

Thank you! I didn't spot it either. :) I don't suppose there is a way to get rid of the DIV/0 if there are no marks at all yet?
 
Upvote 0
Use IFERROR for that

=IFERROR(AVERAGEIFS($D4:$EJ4,$D4:$EJ4,"<>0",$D$2:$EJ$2,"Grade for week"),"")
 
Upvote 0

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