Force Excel formula to interpret blank cell as zero

psaulm119

Board Regular
Joined
Apr 6, 2007
Messages
67
I have a formula to calculate the average of a row of cells. Where I want that average to appear, I have had Excel 2010 insert the average formula, and in the cell itself it reads =AVERAGE(L7:Q7)

Now it is giving me a good average, except that if I have not entered a score, Excel doesn't count that as a zero. By way of example, in cells 1A, 1B, and 1C, there might be 50, 100, and nothing in the blank cell. Excel calculates the average as 75. How can I get Excel to count the blank cell 1C as zero, and give me the average as 50?

How can I get Excel to interpret blank cells as a zero?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Usually, people want the opposite..For the average to ignore blanks.
I think that's why that is the default behavior of Average...

Try

=SUM(L7:Q7)/6

Or to be more dynamic

=SUM(L7:Q7)/COLUMNS(L7:Q7)


Or enter the average as an array with +0..

=AVERAGE(L7:Q7+0)
Entered as an array using CTRL + SHIFT + ENTER


Hope that helps.
 
Upvote 0
Average ignores cells that are blank. Try something like this:
=SUM(L7:Q7)/COLUMNS(L7:Q7)

However, this won't return 50, since it's evaluating all 6 cells in the range
 
Upvote 0
Average ignores cells that are blank. Try something like this:
=SUM(L7:Q7)/COLUMNS(L7:Q7)

However, this won't return 50, since it's evaluating all 6 cells in the range

Thanks to both of you for this solution. Yes, that works.

As far as returning 50, that was just an example I provided so that people would understand what I want to do.

Your forumula did it. Thanks again.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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