Countif of Cells from Multiple Sheets?

jaedmar

Board Regular
Joined
Feb 14, 2011
Messages
60
I have a cell (B7) on multiple worksheets (Sheet 1, Sheet 2, Sheet 3, Sheet 4, and Sheet 5).

In a cell (A3) on Sheet 6, I want to know how many cells B7 in Sheet 1-Sheet 5 have a value in them.

This is what I wrote, but got an error:

=COUNTIF('Sheet 1:Sheet 5'!B7,">0")

How should it be written?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
This should work for you

Somewhere on your sheet add the sheet names and then create a range and call in sheetlist and then for the formula

=SUMPRODUCT(COUNTIF(INDIRECT("'"&sheetlist&"'!B7"),">0"))
 
Upvote 0
I apologize that these questions seem duplicated. They are actually different parts of the spreadsheet. I am very new to this more advanced stuff and haven't quite figured out how to apply some functions with similar cirteria.

Jeff,
Thanks for your reply. I tried the formula you suggested:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&sheetlist&"'!B7"),">0"))

That returns "TRUE" in the cell. I am trying to get it to just show me how many (total number) of the B7 cells have any data input into them.
 
Upvote 0
I apologize that these questions seem duplicated. They are actually different parts of the spreadsheet. I am very new to this more advanced stuff and haven't quite figured out how to apply some functions with similar cirteria.

Jeff,
Thanks for your reply. I tried the formula you suggested:
=SUMPRODUCT(COUNTIF(INDIRECT("'"&sheetlist&"'!B7"),">0"))

That returns "TRUE" in the cell. I am trying to get it to just show me how many (total number) of the B7 cells have any data input into them.

How do you manage to get TRUE from this formula is hard to understand for it can only either yield an error value, 0, or an integer > 0.

If you want to count any data, try...

=SUMPRODUCT(COUNTIF(INDIRECT("'"&sheetlist&"'!B7"),"<>"))
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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