Forum Discussion
NurseTracie
Jan 05, 2024Copper Contributor
Excel formula help!
Hi all! I am trying to calculate the number of times a phrase occurs in a specific cell range on multiple Excel sheets. I need to count the numbers occurrences from 202 different sheets with the...
- Jan 05, 2024
Hi Tracie, I see you tagged '365' so you have access to VSTACK. This will make things easier and INDIRECT is not needed.
First, use VSTACK to combine all the sheets by supplying a 3D reference. Next, determine if the 'input' (the cell containg the text) is equal to the 'stack' (the combined ranges). The result will be a matrix of TRUE and FALSE. N converts those to 1s and 0s then SUM adds them up.
=LET( stack, VSTACK(Sheet1:Sheet3!$A$1:$J$30), SUM(N(input = stack)) )
NurseTracie
Jan 05, 2024Copper Contributor
I figured it out! Thank you Patrick!
Patrick2788
Jan 05, 2024Silver Contributor
Glad it worked. Have a great day!