J
Johnnyboy5
Hi
can anyone help me modify the macro below that Don sent to me.
I need it to select a specific range of worksheets. example sheets
1 to 12 named (April, May, June, July ....etc)
rather than selecting all the sheets in the workbook.
thanks
Johnny
Don Guillett Excel MVP
View profile
More options 26 Sep, 13:26
- Show quoted text -
This might be quicker than a loop for text.
Option Explicit
Sub countjune()
Dim ws As Worksheet
Dim mycol As Range
Dim mc As Long
For Each ws In Worksheets
Set mycol = ws.Columns("N")
mc = mc + Application.CountIf(mycol, "Hello")
Next ws
MsgBox mc
End Sub
can anyone help me modify the macro below that Don sent to me.
I need it to select a specific range of worksheets. example sheets
1 to 12 named (April, May, June, July ....etc)
rather than selecting all the sheets in the workbook.
thanks
Johnny
Don Guillett Excel MVP
View profile
More options 26 Sep, 13:26
- Show quoted text -
This might be quicker than a loop for text.
Option Explicit
Sub countjune()
Dim ws As Worksheet
Dim mycol As Range
Dim mc As Long
For Each ws In Worksheets
Set mycol = ws.Columns("N")
mc = mc + Application.CountIf(mycol, "Hello")
Next ws
MsgBox mc
End Sub