JackDanIce
Well-known Member
- Joined
- Feb 3, 2010
- Messages
- 9,922
- Office Version
- 365
- Platform
- Windows
Hi,
Please can someone help me understand why this code for a select case isn't working, it's skipping straight to the Case Else line - the worksheets with the case names do exist in the workbook as they have been created by another macro and the cases match too:
Thank you,
Jack
Please can someone help me understand why this code for a select case isn't working, it's skipping straight to the Case Else line - the worksheets with the case names do exist in the workbook as they have been created by another macro and the cases match too:
Code:
Sub CountRows()
Dim ws As Worksheet
For Each ws In Worksheets
Select Case ws.Name
Case "Remaining", "No_Break", "Listed_Instruments", "Net_Zero_Difference", _
"One_Dodge_Many_FO", "Many_Dodge_One_FO"
If IsEmpty(Range("A3")) Then
Range("A1").Value = "No breaks"
Else
Range("A1").Value = Range("A2").End(xlDown).Row - 2
End If
Case Else
End Select
Next ws
End Sub
Thank you,
Jack