Excel VBA - Search Formula

  • Thread starter Thread starter ajlove20
  • Start date Start date
A

ajlove20

Hi,

I am working on a program for work. It is supposed to search a colum
for the first empty cell and then clear that row and the rows afte
that. Then it is supposed to go back to the full cells and check th
corresponding rows for empty cells and notify the user to fill them i
by highlighting the empty cell. There should also be a message bo
that comes up to notify the user that there is an empty cell. I wa
wondering how I would go about starting this.

Thanks in advance.

a
 
AJ,

Supposing your column is column A, then:

Sub TryNow()
On Error Resume Next
Range(Range("A:A").SpecialCells(xlCellTypeBlanks)(1), _
Range("A65536")).EntireRow.Delete
If Application.CountBlank(ActiveSheet.UsedRange) > 0 Then
ActiveSheet.UsedRange.SpecialCells(xlCellTypeBlanks).Select
MsgBox "Cell(s) " & Selection.Address(False, False) _
& " should be filled in."
End If
End Sub

HTH,
Bernie
MS Excel MVP
 
Hi Bernie,

Thank you. Is there a way that I can do this creating an input box fo
each blank cell that is left. Thank you.

a
 
Back
Top