SOLVED

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

Copper Contributor

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
best response confirmed by Renee_Gaudet (Copper Contributor)
Solution
Try this formula in G2, and copy down rows:
=COUNTIF(INDIRECT(A2&”!M1:M300”),
“N/A”)

@Twifoo 

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!!

 
1 best response

Accepted Solutions
best response confirmed by Renee_Gaudet (Copper Contributor)
Solution
Try this formula in G2, and copy down rows:
=COUNTIF(INDIRECT(A2&”!M1:M300”),
“N/A”)

View solution in original post