Calculating average while ignoring text and assuming blank cells are 0

johannes2008

New Member
Joined
Aug 20, 2010
Messages
45
Office Version
  1. 365
Platform
  1. Windows
Hello All

I have been trying to figure this one out using AVERAGEIF and AVERAGEIFS but I can't seem to get it. Simply I have a row of data that is mostly numbers but also contains blank cells and cells with text. I want to calculate an average that assumes the blank cells are 0 value and ignores the text. IE:

The average I am looking for with the below table would be 2.833
1235ST6
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Update your profile as suggested by Fluff

Try

Book3
ABCDEFGHIJ
1
21235ST63.4
3
4
5
Sheet1
Cell Formulas
RangeFormula
I2I2=AVERAGEIFS(A2:G2,A2:G2,"<>",A2:G2,"<>0")
 
Upvote 0
Another Try ;)

Book3
ABCDEFGHIJ
1
21235ST62.833333
3
4
Sheet1
Cell Formulas
RangeFormula
I2I2=SUM(A2:G2)/(COUNTBLANK(A2:G2)+COUNT(A2:G2))
 
Upvote 0
Solution
Another option depending on the OP's version
Excel Formula:
=AVERAGE(IFERROR(--A2:G2,""))
 
Upvote 0
Another option depending on the OP's version
Excel Formula:
=AVERAGE(IFERROR(--A2:G2,""))
In case any 'blank' cells actually contain a formula returning ""
Excel Formula:
=AVERAGE(IFERROR(--(0&A2:G2),""))
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

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