Formula Help

gillinglis

New Member
Joined
Oct 5, 2006
Messages
5
Need a YTD % total so add 4 amounts from 4 different sheets, then divide by the count. But some figures are 0 so don't want to include. Can't get Count or CountIf to do this. Any ideas?

Cheers.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You can exclude zeroes from your COUNT with something like:
=COUNTIF(A1:A4,"<>0")

Zeroes won't hurt the adding/summing part, as they are adding nothing to the total.
 
Upvote 0
Still can't get it to work. Can you give me a sample formula? I have four cells on four separate sheets which I've added. This is the formula I used:
=('Sheet1'!M9+'Sheet 2'!M9+'Sheet3'!M9+'Sheet 4'!M9)

this gives me a total of 200.

I want to get a % total and 2 of the 4 figures in the count are 0's so I don't want them to be used.
 
Upvote 0
You can use 4 separate COUNTIFs and add them, though that probably isn't the most efficient use of COUNTIF.

If you are looking at the same cell on every sheet, I believe I have seen some nifty formulas that account for that, though I can't seem to locate them right now.

In the meantime, this may not be the most efficient way, but it should work:
=('Sheet1'!M9+'Sheet 2'!M9+'Sheet3'!M9+'Sheet 4'!M9) /(('Sheet1'!M9<>0)+('Sheet2'!M9<>0)+('Sheet3'!M9<>0)+('Sheet4'!M9<>0))
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,391
Members
449,080
Latest member
Armadillos

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