Is worksheet empty

Function to determine if a specified worksheet contains data.
Author: michael@excelexperts.co.uk

Function IsSheetEmpty(wsName As String) As Boolean

    If WorksheetFunction.CountA(Worksheets(wsName).Cells) = 0 Then
        IsSheetEmpty = True
    Else
        IsSheetEmpty = False
    End If

End Function

Address

Brookfield,
55 Heath Drive
Brookwood, Surrey
GU24 0HQ England

Scroll to Top