Find Average of Row excluding a certain column

nirvehex

Well-known Member
Joined
Jul 27, 2011
Messages
503
Office Version
  1. 365
Platform
  1. Windows
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

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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.
 
Upvote 0
Nevermind...got it. I'm justing to replace the 0's with "".

Thanks!
 
Upvote 0
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)
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,605
Members
449,038
Latest member
Arbind kumar

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