How to Count Data Across Sheets

SparkLeMur

New Member
Joined
Jul 26, 2017
Messages
3
Working on a project, and I need to count how many times different keywords are entered across sheets. I know I could just Click on each sheet and select each individual title, but that isn't efficient because I have to deal with over 100 different data points over a years worth of data. Is there any formula I could use to assist me? I've tried COUNTIF but I don't know if I used it correctly.

If I wasn't clear, this is what I mean.

Sheet A has a list of keywords, sheet B-D have those keywords interspersed with other Data. How do I count how many times the keywords appear on sheets B-D without individually selecting on each sheet
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
A short macro might be your best bet, if you can use macros. This assumes that your keywords are listed in column A of sheet 1.

Code:
Sub countKeywords()
Dim c As Range, i As Long, cnt As Long
    For Each c In Sheets(1).Range("A1", Sheets(1).Cells(Rows.Count, 1).End(xlUp))
        For i = 2 To 4
            cnt = cnt + Application.CountIf(Sheets(i).UsedRange, "*" & c.Value & "*")
        Next
        c.Offset(, 1) = cnt
        cnt = 0
    Next
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,272
Members
452,628
Latest member
dd2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top