Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.
Become a Premium Member and unlock a new, free course in leading technologies each month.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Columns(1)) Is Nothing Then
If Range("B" & Target.Row).Value = "" Or _
Range("C" & Target.Row).Value = "" Or _
Range("D" & Target.Row).Value = "" Then
MsgBox " You must have entries in columns B, C and D for row " & Range.Row
End If
ElseIf Not Intersect(Target, Columns(14)) Is Nothing Then
If Target.Value = "YES" And Range("O" & Target.Row).Value = "" Then
MsgBox " You must have entries in column O for row " & Range.Row
ElseIf Target.Value = "" And Range("O" & Target.Row).Value <> "" Then
MsgBox "Column O must be empty for row " & Range.Row
End If
End If
End Sub
test.xls
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Columns(1)) Is Nothing Then
If Range("B" & Target.Row).Value = "" Or _
Range("C" & Target.Row).Value = "" Or _
Range("D" & Target.Row).Value = "" Then
MsgBox " You must have entries in columns B, C and D for row " & Target.Row
End If
ElseIf Not Intersect(Target, Columns(14)) Is Nothing Then
If Target.Value = "YES" And Range("O" & Target.Row).Value = "" Then
MsgBox " You must have entries in column O for row " & Target.Row
ElseIf Target.Value = "" And Range("O" & Target.Row).Value <> "" Then
MsgBox "Column O must be empty for row " & Target.Row
End If
End If
End Sub
test.xls
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Columns(1)) Is Nothing And Target.Row <> 1 Then
If Range("B" & Target.Row).Value = "" Or _
Range("C" & Target.Row).Value = "" Or _
Range("D" & Target.Row).Value = "" Then
MsgBox " You must have entries in columns B, C and D for row " & Target.Row
End If
ElseIf Not Intersect(Target, Columns(14)) Is Nothing And Target.Row <> 1 Then
If Target.Value = "YES" And Range("O" & Target.Row).Value = "" Then
MsgBox " You must have entries in column O for row " & Target.Row
ElseIf Target.Value = "" And Range("O" & Target.Row).Value <> "" Then
MsgBox "Column O must be empty for row " & Target.Row
End If
End If
End Sub
test.xls
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.