View Single Post
 
Old 07-05-2015, 12:54 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For a basic report, you could use code like:
Code:
Dim lRow As Long, bEmpty As Boolean
lRow = ThisWorkbook.ActiveSheet.UsedRange.Cells.SpecialCells(xlCellTypeLastCell).Row
bEmpty = True
With Selection
  If .Rows(1).Row < lRow Then
    If ThisWorkbook.ActiveSheet.Range("A" & .Rows(1).Row & ":B" & .Rows(.Rows.Count).Row).SpecialCells(xlCellTypeBlanks).Count _
      < .Rows.Count * 2 Then bEmpty = False
  End If
  If bEmpty = True Then
    MsgBox "All rows in columns A & B in the selected rows are empty."
  Else
    MsgBox "At least one row in columns A & B iin the selected rows is not empty."
  End If
End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]

Last edited by macropod; 07-05-2015 at 01:13 AM. Reason: Enhanced code
Reply With Quote