I need help with the below VBA I am trying to run.
I have multiple sheets that may or may not have data in it. They will always have headings in row 1, but may not always have data from row 2 onwards.
What I am trying to do is to look through these sheets and if there is data in there, copy it to a combined sheet.
The below finds the first sheet that has data in row 2 and copies it as expected, but then the macro finishes without looking in all the other sheets and I don't know why?
Any help much appreciated or if you have further questions about what I am doing in case it's not completely understandable!
For Each ws In ActiveWorkbook.Worksheets
Select Case ws.Name
Case "Setup", "Combined", "Summary", "Drop Down Menus"
'do nothing
Case Else
Set wsDestination = ThisWorkbook.Worksheets("Combined")
If IsEmpty(Range("A2").Value) Then
'find the last row
lrow = ws.Range("A" & ws.Rows.Count).End(xlUp).Row
With wsDestination
ws.Range("A2:L" & lrow).Copy Destination:=.Range("A" & .Rows.Count).End(xlUp).Offset(1)
End With
End If
End Select
Next