# Find Average of Row excluding a certain column

#### nirvehex

##### Active Member
Hi,

I have data in rows from C23:O23. One of those columns is going to have a header in row 22 that is called "Grand Total". Sometimes this may be in column L, sometimes it may be in column O, sometimes it may be in column D, basically it moves around and doesn't stay in a certain column, but it will always be between column C and O.

I want to create a formula that calculated the average of C23:O23 but excludes the column that has "Grand Total" as the header from the average calculation.

Any ideas?

Thanks.

### Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Code:
``=AVERAGEIF(\$C\$22:\$O\$22,"<>" & "Grand Total",\$C\$23:\$O\$23)``

Sorry one more question....

M data is in C28:N28 and I want to take the average of the row. However some columns have 0's in them and I do not want to include them in the average. Any idea how to do this?

Thanks.

Nevermind...got it. I'm justing to replace the 0's with "".

Thanks!

Sorry one more question....

M data is in C28:N28 and I want to take the average of the row. However some columns have 0's in them and I do not want to include them in the average. Any idea how to do this?

Thanks.

Just in case someone stumbles on this thread:

Code:
``=AVERAGEIFS(\$C\$28:\$N\$28, \$C\$27:\$N\$27, "<>" & "Grand Total",\$C\$28:\$N\$28, ">" & 0)``

Replies
1
Views
183
Replies
8
Views
261
Replies
5
Views
472
Replies
1
Views
465
Replies
2
Views
232

1,203,067
Messages
6,053,335
Members
444,654
Latest member
Rich Cohen

### 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.

### Which adblocker are you using?

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

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