Excel VBA - Search Formula

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
 
B

Bernie Deitrick

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
 
A

ajlove20

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top