Thread: Help!
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Help!

Probably better written as

Set rng = Range("V38,V45,V52,V58,V65,V72,V78,V84")

If SomeCondition Then
'Do something
ElseIf Range("AG16").Value = "N" And _
(rng.Value < "Amy" Or _
rng.Value < "Alternate") Then
ActiveCell = "Amy"
End If



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Norman Jones" wrote in message
...
Hi Erik,

Try something like:


Set rng = Range("V38,V45,V52,V58,V65,V72,V78,V84")

If SomeCondition Then
'Do something
ElseIf Range("AG16").Value = "N" _
And rng.Value < "Amy" _
Or rng.Value < "Alternate" Then
ActiveCell = "Amy"
End If


---
Regards,
Norman



"Erik K via OfficeKB.com" <u13156@uwe wrote in message
news:56289c42fefa9@uwe...
I am running into a problem with the following line in my program. Can
someone tell me the correct syntax?:

ElseIf Range("AG16").Value = "N" And
Range("V38,V45,V52,V58,V65,V72,V78,V84").
Value < "Amy" Or "Alternate" Then
ActiveCell = "Amy"


--
Message posted via http://www.officekb.com