Limit data entre!
One way
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const WS_RANGE As String = "C:C,F:F" '<== change to suit
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
If .Column = 3 Then
If .Offset(0, 3).Value < "" Then .Offset(0, 3).Select
Else
If .Offset(0, -3).Value < "" Then .Offset(0, -3).Select
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Scott_goddard" wrote in message
...
Right i have two colums of data C and F. All i want to do is limit data
to
only one of the colums. For example if someone types £3.00 in C19, then F
19
would be blocked.
|