Dont allow blank

N

nowfal

Hi,
I would like to know how can i prevent a cell being blank. It i
like as follows:
I have colomn I,J,K,L . If colomn I is blank J,K,L should not take an
data, otherwise a message should come like you cannot keep the the cel
blank like that. Is it possible to do so. Any suggestion will be highl
helpful.
thank you
nowfa
 
F

Frank Kabel

Hi
only possible with VBA using an event procedure before closing/saving
the file
 
R

Ron de Bruin

You can use this event in a worksheet module

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Cells(Target.Row, 1) _
.Range("J1,K1,L1"), Target) Is Nothing Then
If Cells(Target.Row, "I") = "" Then
MsgBox " sorry the I column is empty"
Application.EnableEvents = False
Target.Value = ""
Application.EnableEvents = True
End If
End If
End Sub
 
Top