• 413K Members
• 6,425 Online
• 474K Conversations
SOLVED

New Contributor

# Counta/CountIF autopopulate range from different sheet, where the sheet name may change

Hello,

I don't know if this is possible, I have a very unique situation. We use Excel for our test cases, usually multiple sheets in one file. The main sheet is a summary results page, where we summarize how many tests have been executed, how many passed, failed etc. To do this we utilize the COUNTA and CountIF formulas and reference the other sheets.

for example

=COUNTA(Sheet2!A2:A25)

=COUNTIF(Sheet2!M2:M300,"P")

Our issue is, the name for the sheets change by project, and it takes a long time to change all the sheet names in all the formulas in this page. Especially when we have 30 sheets. In the summary sheet we have a column with all of the sheet names, is there a way to autofill the sheet name from the previous column?

Including a screenshot to help visualize what I am trying to explain. Each cell in columns b, c, e, f, and g have a formula referencing another sheet. Is there a way to take the sheet2 name from the previous column and make it so that it has the ! to reference the other sheet in the formulas, automatically without having to fill it in manually each time a sheet name is changed.

Any and all help is much appreciated!

3 Replies
Solution

# Re: Counta/CountIF autopopulate range from different sheet, where the sheet name may change

Try this formula in G2, and copy down rows:
=COUNTIF(INDIRECT(A2&”!M1:M300”),
“N/A”)

# Re: Counta/CountIF autopopulate range from different sheet, where the sheet name may change

That worked!! For some reason it didn't like the formatting from here, but when I typed it into my formula your recipe worked! thanks so much!!

# Re: Counta/CountIF autopopulate range from different sheet, where the sheet name may change

You're very much welcome!

Related Conversations
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies