Home > database >  Get total count of matching string from different sheets
Get total count of matching string from different sheets

Time:12-02

I have the multiple sheets in a single workbook.

The first sheet is having summary details:

enter image description here

Other sheets are like details as show below:

enter image description here

I want to get total count name occurred in all the sheets in workbook.

Expected output should be:

enter image description here

CodePudding user response:

Create a list of all relevant worksheet names and store it within Name Manager, as SheetList, say.

Your formula is then:

=SUMPRODUCT(COUNTIF(INDIRECT("'"&SheetList&"'!A:A"),B2))

where I've assumed that the column to be queried in each of those worksheets is column A and that the first entry in the Summary sheet for which you wish to obtain a count is in cell B2.

Copy down to give results for further entries in B3, B4, etc.

CodePudding user response:

Depending on your sheetnames, try something like:

=SUM(--(TOCOL(Sheet2:Sheet3!A:A,1)=B2))
  • Related