Forum Discussion
KrisRagu
Nov 04, 2021Copper Contributor
COUNTIF question
I need to count the occurrence of a value in a cell in Sheet1.... the search should include all sheets in the workbook that "contain" the value . Tried this formula and it doesn't work: =COUNTIF(IN...
OliverScheurich
Nov 04, 2021Gold Contributor
=SUM(COUNTIF(INDIRECT("plans"&ROW(1:2)&"!A1:XFD1048576"),"*"&A2&"*"))
If entered as arrayformula with ctrl+shift+enter in "sheet1", formula counts text values entered in A2 (in "sheet1") in spreadsheets named "plans1" and "plans2" in range A1:XFD1048576 (partial match as intended). Formula can easily be adapted to more spreadsheets named plans1, plans2, plans3, plans4 and so on.