Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Windows 2k Pro
Excel 2000 What is the syntax for this situation: If a = x and b = y Then [code] End If Apparently the above doesn't work. All help appreciated. -gk- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi TBA!
Try: Sub test() If Range("A4") = 7 And Range("B4") = 4 Then Range("C4") = 11 End If End Sub Same principle would apply to Or But what is your specific problem as you seem to have it OK? -- Regards Norman Harker MVP (Excel) Sydney, Australia Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "TBA" wrote in message ... Windows 2k Pro Excel 2000 What is the syntax for this situation: If a = x and b = y Then [code] End If Apparently the above doesn't work. All help appreciated. -gk- |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Silly me...
I had tried this If a = 5 OR 7 OR 9 Then ...... doh!! Thanks for the slap upside the head. ;) -gk- "Norman Harker" wrote in message ... Hi TBA! Try: Sub test() If Range("A4") = 7 And Range("B4") = 4 Then Range("C4") = 11 End If End Sub Same principle would apply to Or But what is your specific problem as you seem to have it OK? -- Regards Norman Harker MVP (Excel) Sydney, Australia Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "TBA" wrote in message ... Windows 2k Pro Excel 2000 What is the syntax for this situation: If a = x and b = y Then [code] End If Apparently the above doesn't work. All help appreciated. -gk- |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As is the code sample is fine. Why do you think that it
does not work? Sub test() Dim a As Long, b As Long, x As Long, y As Long a = 5 x = 5 b = 3 y = 3 If a = x And b = y Then MsgBox "hello world!" End If End Sub -----Original Message----- Windows 2k Pro Excel 2000 What is the syntax for this situation: If a = x and b = y Then [code] End If Apparently the above doesn't work. All help appreciated. -gk- . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
question related to merging multiple statements | Excel Worksheet Functions | |||
IF Statements (Mutliple Statements) | Excel Worksheet Functions | |||
If Statements Question | Excel Discussion (Misc queries) | |||
Another question concerning IF statements | Excel Discussion (Misc queries) | |||
Question concerning IF statements | Excel Discussion (Misc queries) |