VBA:
Sub TestBlanks()
Dim rng1 As Range, rng2 As Range
Set rng1 = Range("H1:H20") 'Range To Test
On Error Resume Next
Set rng2 = rng1.SpecialCells(xlCellTy
If rng2 Is Nothing Then Set rng2 = rng1
On Error GoTo 0
If rng2.Address = rng1.Address Then
MsgBox "All Blanks"
Else
MsgBox "Not Blanks"
End If
OR USING A FORMULA
For a range of cells
=IF(COUNTBLANK(A1:A10)<10,
For the full column
This will count cells with a value
=COUNTIF(A:A,"*")+COUNTIF(
So, to check they're all empy you can do...
=IF(COUNTIF(A:A,"*")+COUNT
Main Topics
Browse All Topics





by: hiteshgoldeneyePosted on 2007-08-23 at 01:06:52ID: 19752286
Try using
if Trim(Cells(x,5).Value) <> ""