Thread: data check
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
losmac[_2_] losmac[_2_] is offline
external usenet poster
 
Posts: 44
Default data check


Sub TestData()
Dim i As Long
Dim continueWork As Boolean

continueWork = True

For i = 1 To 3
If IsEmpty(Worksheets(1).Cells(1, i)) Then
MsgBox "You need to fill cell: " & Worksheets
(1).Cells(1, i).Address
continueWork = False
End If
Next i

If Not continueWork Then Exit Sub

'some other instructions if continueWork is set to True


End Sub


-----Original Message-----
Hi

I need to check that all data in a row is filled in. For
example, if there is an entry in D1, there must be

entries
in A1, B1, and C1. It will be up to the user to fill in
the required data for A1, B1, and C1.

I plan to run this as a macro that will check that all
data is entered, and display a message back to the user
that they need to update some cells.


.......thanks in advance.......Herb
.