Forum Discussion
Contar una frase en toda el libro
yes but more details or a better yet a sample workbook would help.
what do you mean by "whole excel workbook" (i.e. multiple sheets)?
should the cell match the phrases or just contain the phrase?
what if the cell has the phrase more than 1 time?
if it is only on 1 or 2 sheets it may be easy to use COUNTIF
=COUNTIF(Sheet1!C1:ZZ1000,"*"&A1&"*")
alternatively you might try
=SUM(--ISNUMBER(SEARCH(A1,C1:ZZ1000)))
So the COUNTIF you can easy make dynamic array and add for multiple sheets:
=COUNTIF(Sheet1!C1:ZZ1000,"*"&A1:A100&"*") + COUNTIF(Sheet2!A1:ZZ1000,"*"&A1:A100&"*")
But if you have lots of sheets or unknown number you can get tricky with the second as long as you know the first and last sheet (you can use hidden sheets to help) and as long as the total number of sheets and areas on the sheets aren't too big
=SUM(--ISNUMBER(SEARCH(A1, VSTACK( First_Sheet:Last_Sheet!$A$1:$ZZ$1000))))
to make that a dynamic array you would just need to wrap that with MAP or BYROW helper LAMBDA function