Some ideas
1. Not 'error checking' but more 'validity checking' -- IMHO it's better to prevent an error than to try and recover from one
2. I prefer to avoid global variables as much as possible (Dim ws as Worksheet) and pass such things as a calling parameter (Call Markers(ws))
3. You never defined what 'no data' means, so I went with a completely blank worksheet -- you may have to change that
Option Explicit
Dim ws As Worksheet
Sub Main()
Dim i As Long
For i = 1 To 4
Set ws = Worksheets("Data" & i)
Call Markers(ws)
Next
End Sub
Sub Markers(sht As Worksheet)
Dim M As Double
M = sht.Rows.Count ' avoid overflow
M = M * sht.Columns.Count
If Application.WorksheetFunction.CountBlank(sht.Cells) = M Then
MsgBox ws.Name & " is empty"
Exit Sub
End If
MsgBox "Doing stuff on " & ws.Name
End Sub