Hi again,
How do I change the macro below if I need to have two ranges in column B
like B1:B12 and B20:B30.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Target.Row < 1 Or Target.Row > 12 Then Exit Sub
If Target.Column = 2 Then
If Target.Offset(0, -1) = "" Then
MsgBox "You cannot enter data in Column B if the cell in Column A is blank"
Target.Offset(0, -1).Select
End If
End If
End Sub
Thanks a million
Andonny
How do I change the macro below if I need to have two ranges in column B
like B1:B12 and B20:B30.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
If Target.Row < 1 Or Target.Row > 12 Then Exit Sub
If Target.Column = 2 Then
If Target.Offset(0, -1) = "" Then
MsgBox "You cannot enter data in Column B if the cell in Column A is blank"
Target.Offset(0, -1).Select
End If
End If
End Sub
Thanks a million
Andonny