Can anybody tell me why this formula doesn't work?

silvertears

New Member
Joined
Aug 27, 2004
Messages
4
=COUNTIF('January!B3:AF3,February!B3:AF3,March!B3:AF3,April!B3:AF3,May!B3:AF3,June!B3:AF3,July!B3:AF3,August!B3:AF3,September!B3:AF3,October!B3:AF3,November!B3:AF3,December!B3:AF3,B1)


I am trying to get it to count cells that match cell B1 on the end there on those 12 sheets (1 for each month). It doesn't want to do more than one sheet at a time though. Got any ideas apart from doing each sheet separately and than adding those up?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi

Try this just amended the ranges as needed.

=SUMPRODUCT(--(A3:A13=B1))+SUMPRODUCT(--(Sheet2!A3:A12=Sheet1!
B1))


Steve
 
Upvote 0
silvertears said:
=COUNTIF('January!B3:AF3,February!B3:AF3,March!B3:AF3,April!B3:AF3,May!B3:AF3,June!B3:AF3,July!B3:AF3,August!B3:AF3,September!B3:AF3,October!B3:AF3,November!B3:AF3,December!B3:AF3,B1)


I am trying to get it to count cells that match cell B1 on the end there on those 12 sheets (1 for each month). It doesn't want to do more than one sheet at a time though. Got any ideas apart from doing each sheet separately and than adding those up?

Try,

=SUMPRODUCT(COUNTIF(INDIRECT("'"&Sheets&"'!B1"),B3:AF3))

Where Sheets is a named range housing your sheet names.
 
Upvote 0
Silver Tears

Maybe:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&TEXT(DATE(2005,ROW(INDIRECT("1:12")),1),"mmmm")&"'!B3:AF3"),B1))


Which doesn't require a named range as per Brian's suggestion, but does assume there are 12 sheets named after the months (full names eg "January" not "Jan").

Best regards

Richard
 
Upvote 0
Thanks a million!!!

Thanks, for everyone's help. I ended up using Parsnip's, it was just easier! Even *I* would never guess I had my expert certification in Excel. It's been so long since I worked with it, I think I have forgotten EVERYTHING! I appreciate the help!

Silver
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,048
Members
448,543
Latest member
MartinLarkin

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