Find Average of Row excluding a certain column

nirvehex

Active Member
Joined
Jul 27, 2011
Messages
493
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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

nirvehex

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

nirvehex

Active Member
Joined
Jul 27, 2011
Messages
493
Office Version
  1. 365
Platform
  1. Windows
Nevermind...got it. I'm justing to replace the 0's with "".

Thanks!
 

NeonRedSharpie

Well-known Member
Joined
Jul 14, 2014
Messages
1,678
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)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,101
Messages
5,835,389
Members
430,354
Latest member
Novice125

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
Top