Find empty cell then stop

D

Dolphinv4

Hi,

I'd like to have a macro that does this:

1) for cells in column F that is a) not empty & b) greater than 3000000,
search thru column K for the first empty cell. If there is, a message box to
be shown for the cell address. Then the whole macro should stop.

Thanks,
Dolphin
 
B

Bernie Deitrick

Perhaps?

Sub TryNow()
Dim myR As Long
Dim i As Long

myR = Cells(Rows.Count, 6).End(xlUp).Row

For i = 1 To myR
If Cells(i, 6).Value > 3000000 And Cells(i, 11).Value = "" Then
MsgBox Cells(i, 11).Address
Exit Sub
End If
Next i
End Sub

HTH,
Bernie
MS Excel MVP
 

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