Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi all i have a doubt about the syntax of this to be correct..
i want b5+b9 or b5+l9 do i have to use parenthesis around or ?? tyvm If Range("B5") = 1 And Range ("B9") = True Or Range("B5") = 1 And ("L9") = True Then Range("A1") = 'You are lucky! End If |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
As soon as you are using a combination of And and Or it is better to use () Try If (Range("B5") = 1And Range("B9") = True) Or _ (Range("B5") =1 And Range("L9") = True) Then Range("A1") = 'You are lucky! End If HTH, RadarEye On 22 sep, 13:31, pls123 wrote: hi all i have a doubt about the syntax of this to be correct.. i want b5+b9 or b5+l9 do i have to use parenthesis around or ?? tyvm If *Range("B5") = 1 And Range ("B9") = True * Or * Range("B5") = 1 And ("L9") = True Then Range("A1") = 'You are lucky! End If |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, you have to!
If (Range("B5") = 1 And Range ("B9") = True) Or (Range("B5") = 1 And ("L9") = True) Then Regards, Stefi €˛pls123€¯ ezt Ć*rta: hi all i have a doubt about the syntax of this to be correct.. i want b5+b9 or b5+l9 do i have to use parenthesis around or ?? tyvm If Range("B5") = 1 And Range ("B9") = True Or Range("B5") = 1 And ("L9") = True Then Range("A1") = 'You are lucky! End If |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ty!!
"Stefi" wrote: Yes, you have to! If (Range("B5") = 1 And Range ("B9") = True) Or (Range("B5") = 1 And ("L9") = True) Then Regards, Stefi €˛pls123€¯ ezt Ć*rta: hi all i have a doubt about the syntax of this to be correct.. i want b5+b9 or b5+l9 do i have to use parenthesis around or ?? tyvm If Range("B5") = 1 And Range ("B9") = True Or Range("B5") = 1 And ("L9") = True Then Range("A1") = 'You are lucky! End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|