Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default help with stupid (simple) error

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
#VALUE Error should be simple fix Mykull Excel Discussion (Misc queries) 4 May 5th 09 11:19 PM
Fix Simple #Div/0! error taxmom Excel Worksheet Functions 4 April 18th 06 06:53 PM
3 stupid, simple IFs Steve Excel Worksheet Functions 8 July 3rd 05 04:17 PM
Simple #DIV/0! error AMY Z. Excel Worksheet Functions 2 January 23rd 05 10:25 PM
Simple INT error? Roger[_7_] Excel Programming 8 October 6th 03 09:19 AM


All times are GMT +1. The time now is 10:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"