Use sheet names in column in COUNTIF formula?

  • Thread starter Thread starter Ed from AZ
  • Start date Start date
E

Ed from AZ

I have the names of my worksheets in Col A. I want to do a COUNTIF
for all these sheets in the same range on every sheet. Is there some
way I can incorporate the cell with the sheet name into the formula?
Something like:

Col A Col B
Sheet1 =COUNTIF('(ValueofThisSheet!A2)'!B2:B20,"*")
Sheet2
Sheet3

And then of course copy it down the column to pick up all the sheet
names?

Ed
 
Hi Ed,

you use the INDIRECT function to do this, like so:

=COUNTIF(INDIRECT("'"&A2&"'!B2:B20"),"item")

Then copy down.

Hope this helps.

Pete
 
Thanks, Pete! It worked great!
Ed


Hi Ed,

you use the INDIRECT function to do this, like so:

=COUNTIF(INDIRECT("'"&A2&"'!B2:B20"),"item")

Then copy down.

Hope this helps.

Pete






- Show quoted text -
 

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

Back
Top