Searching for non null cells

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I'd like to create a scrip that searches a column for non null cells. Then
when it finds the non null cell it displays the cell name (i.e a10)
any suggestions?

Thanks,
 
Hi

Look at this:

Sub FindNonNullCells()
Dim TargetCol As String
Dim LastRow As Long

TargetCol = "A"
LastRow = Cells(Rows.Count, TargetCol).End(xlUp).Row

For r = 1 To LastRow
If Range(TargetCol & r).Value = "" Then
msg = MsgBox("Null cell found in : " & TargetCol & r)
End If
Next
End Sub

Regards,
Per
 
Back
Top