Forum Discussion

NurseTracie's avatar
NurseTracie
Copper Contributor
Jan 05, 2024
Solved

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...
  • Patrick2788's avatar
    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))
    )

     

     

Resources