Find Average of Row excluding a certain column

nirvehex

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

Some videos you may like

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

nirvehex

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

Watch MrExcel Video

Forum statistics

Threads
1,122,491
Messages
5,596,477
Members
414,070
Latest member
DuncanLucas

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