Hi,
I have the following code I would like altering so if there is more than 1 blank cell in the range it states which ones via the cell headings in the message box.
Thanks
Dan
I have the following code I would like altering so if there is more than 1 blank cell in the range it states which ones via the cell headings in the message box.
Code:
Sub IsEmptyRange()Dim cell As Range
Dim bIsEmpty As Boolean
bIsEmpty = False
For Each cell In Range("B7:D7,F7")
If IsEmpty(cell) = True Then
'An empty cell was found. Exit loop
bIsEmpty = True
Exit For
End If
Next cell
If bIsEmpty = True Then
MsgBox "There are empty cells in your range " & Cells(6, cell.Column).Value
Else
MsgBox "All cells have values!"
End If
End Sub
Thanks
Dan