Average same cell on multiple sheets excluding blank

Grinch

New Member
Joined
Mar 14, 2011
Messages
17
sheets are named 1 through 22, the cell is f2 so I was trying:

=AVERAGE('1:22'!F2)/COUNTIF('1:22'!F2,">0")

but I come up with a #VALUE!

any ideas?
 
Silly me, it was showing zero because I had not converted it to a percentage like I wanted. The formula was correct and worked for me, thank you!

You are welcome. Thanks for the update.

I now have another question...I want to create a graph from my data that automatically updates with new entries and also ignores 0's. The cells with 0's in them have formulas and are returning a 0 value because entries have not been put in yet. I converted the 0's to "NA()" and it seems to have worked but the graph does not update automatically. any thoughts?

Thanks.

You might want to try using an Excel table (the Insert Table option from the ribbon).

You can then create an additional column with a formula in it that says:

IF(ISNUMBER(1/C2),C2,NA())
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I don't understand why I need that formula. My current IF formula contains a VLOOKUP for the data I want and if it contains a 0 I told the IF formula to return NA() and it's done that, it works great. I just cannot get the chart to update automatically. I've named my range of data and created the chart that way, but it still won't update automatically.
 
Upvote 0
I don't understand why I need that formula. My current IF formula contains a VLOOKUP for the data I want and if it contains a 0 I told the IF formula to return NA() and it's done that, it works great. I just cannot get the chart to update automatically. I've named my range of data and created the chart that way, but it still won't update automatically.

Care to post that formula containing VLOOKUP?
 
Upvote 0
=IF(VLOOKUP(Totals!F2,Totals!$F$1:$I$34,1,)=0,NA(),(VLOOKUP(Totals!F2,Totals!$F$1:$I$34,1,)))

I have this formula across 3 columns, pulling data from 3 columns on the Totals sheet. Whenever a new entry is entered on the Totals sheet, I want my graph to update automatically on a separate sheet (the one that contains the above formula)
 
Upvote 0
Yeah I was pulling the number from the 2nd row, F column, out of a 4 column range and I wanted the number from the first column (F). However, it was not pulling the correct numbers from each column. So I changed the formula to =INDEX(Totals!F2:F61,MATCH(Totals!F2,Totals!F2:F61,0)) and started getting the right numbers and now my chart is updating automatically!
 
Upvote 0
Yeah I was pulling the number from the 2nd row, F column, out of a 4 column range and I wanted the number from the first column (F). However, it was not pulling the correct numbers from each column. So I changed the formula to =INDEX(Totals!F2:F61,MATCH(Totals!F2,Totals!F2:F61,0)) and started getting the right numbers and now my chart is updating automatically!

I'm still in dark...

Is this not what you are looking for?

=IF(Totals!F2,Totals!F2,NA())
 
Upvote 0
That may have been an easier way to do it. I didn't think of that because I was trying to pull data from a different sheet. But the INDEX and MATCH formula seems to have worked! Thanks for your help
 
Upvote 0

Forum statistics

Threads
1,214,996
Messages
6,122,636
Members
449,092
Latest member
bsb1122

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