Count through tabs

G

Guest

Hi all,
I have a document that has 12 tabs,named after the months of the year.
Could anybody tell me how to create the following equations:
* COUNTIF column A in January tab +column A in February tab +column A in
March tab +column A in May tab +column A in June tab +column A in July tab
+column A in August tab +column A in September tab +column A in October tab
+column A in November tab +column A in December tab = "Peter"
 
R

Ragdyer

I assume you *accidently* left out APRIL.

Anyway ... you'll have to make a datalist of your tab names.
Make sure that the spelling is *exactly* as they appear in the tabs.
Say you create this list in Z1 to Z12.

Then try this:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&Z1:Z12&"'!A:A"),"Peter"))

Watch those apostrophes and double quotes!
They're included just in case there might be spaces in the sheet names.
 
T

T. Valko

=SUMPRODUCT(COUNTIF(INDIRECT("'"&TEXT(ROW(INDIRECT("1:12"))*30,"mmmm")&"'!A:A"),"Peter"))

TEXT(ROW(INDIRECT("1:12"))*30,"mmmm")

will generate the sheet names:

January
February
March
...
December

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top