Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help!
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help!
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|