Morstan
Morstan

Reputation: 11

Countif across multiple worksheets

I am trying to get a tally of how many times two values appear across multiple worksheets.

This formula does exactly what I need but only on one worksheet. When I expand the search range, I get a #VALUE error.

This works:
=(COUNTIF('16-Feb'!A:J,A2)*AND(COUNTIF('16-Feb'!L:L,"email")))

This doesn't:
=(COUNTIF('9-Feb:26-Mar'!A:J,A2)*AND(COUNTIF('9-Feb:26-Mar'!L:L,"email")))

What am I doing wrong?

Upvotes: 0

Views: 2332

Answers (1)

tysonwright
tysonwright

Reputation: 1525

Do the COUNTIFs separately for each worksheet, then add them together:

=(COUNTIF('16-Feb'!A:J,A2)*AND(COUNTIF('16-Feb'!L:L,"email")))
+
(COUNTIF('9-Feb'!A:J,A2)*AND(COUNTIF('9-Feb'!L:L,"email")))

Upvotes: 1

Related Questions