Dont allow blank

N

nowfal

Mr.Ron de bruin,
Yes, finally it works perfectly as i wanted
i have changed the code little bit. But the full credit is yours. Now
can do the work with the both code at a time. I dont know how do i than
to you.
this is the final code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Range("C2"), Target) Is Nothing Then
If IsNumeric(Target.Value) And Target.Value > 0 Then
CUSTOMER
End If
End If

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

with regards
nowfa
 

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