Thread: Lookup VBA
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Lookup VBA

Yep, you are correct, Rick. Actually, there is a lot more code that could
be added to make the process fully effective. I suppose the OP will figure
that out as they progress.


"Rick Rothstein" wrote in message
...
I believe you should put an Exit For statement after your MsgBox statement,
otherwise you will pop up the MessageBox for each set of cells meeting the
If..Then test.

--
Rick (MVP - Excel)


"JLGWhiz" wrote in message
...
Sub isitthere()
Dim lr As Long, rng As Range
lr = ActiveSheet.Cells(Rows.Count, "K").End(slUp).Row
rng = ActiveSheet.Range("K4:K" & lr)
For Each c In rng
If c.Value "" And c.Offset(0, 1) = "" Then
MsgBox "Please Update the Sheet"
End If
Next
End Sub


"tomjoe" wrote in message
...
I have a workbook with 2 sheets.
I am looking for a short procedure that detects if there, in sheet 2, is
any
occupied cell in column K (K4 and down) with no data in the cell to the
right
(column I). Then a message should pop up saying: "Please update the
sheet".

Any suggestions?