View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default help with stupid (simple) error

mark,

I cleaned it up a little...
'-------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo NoChange
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("C14:C23")) Is Nothing Then
If Target.Offset(0, -1).Value = "" Then Target.Offset(0, -1).Value = "1"
End If
NoChange:
Application.EnableEvents = True
End Sub
'------------------

Jim Cone
San Francisco, USA


"mark kubicki" wrote in message
...
why isn't this assigning the value (i'm tired, it's late, and i'm just
missing the obvious... blah, blah, blah)

If Not Intersect(Target, Me.Range("c14:c23")) Is Nothing Then 'Exit Sub
With Target
If Target.Offset(0, -1).Value = "" Then
Range(Target.Offset(0, -1)).Value = "1"
End If
End With
End If