Thread: elseif
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default elseif

If Target.Column = 12 And IsNumeric(Target.Value) Then

If Target.value <= 0 Then
Call Copycomp(Target)
Target.Value = 0
elseIf Target.Column = 12 and Target.Value = 10 Then
Target.Value = 10
End If
end if

--
Regards,
Tom Ogilvy

"Curt" wrote:

useing code that follows have tried to have code call copycomp sometimes will
also code changes all entries to 0 not sure where to go stumped. Think there
should be a way to use elseif. Tried to no avail. Want column to be as code
calls for. Have 3 calls befor this one that work fine.
Thanks

If Target.Column = 12 And Target.Value <= 0 And IsNumeric(Target.Value) Then _
Call Copycomp(Target) 'do this then'_

If Target.Column = (12) <= 0 Then _
Target.Value = 0
If Target.Column = (12) = 10 Then _
Target.Value = 10
' End If
' If Target.Column = (12) And Target.Value < 10 Then
' Target.Value = 10
' If Target.Column = 12 And Target.Value <= 0 Then _
' Target.Value = 0
Application.EnableEvents = True
' End If