Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Structure of If...Else in VBA
Sheela,
If the following example doesn't help, please post an example of your code: This works for me: If cMan1 = cMan2 And cMan1 = cMan3 And cMod1 = cMod2 And cMod1 = cMod3 Then ' do something Else ' do something End If Sheela wrote: Hello, I have a situation here. When I break up an if..else statement in the excel worksheet, as in A < B < C to AND (A<B;B<C), it works but when I convert to VBA as in "If (A<B) And (B<C) Then" it does not work. I realized it makes a difference when I break up the condition in worksheet but how do I go about doing it in VBA? Thanks for your help. Sheela |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Structure of If...Else in VBA
I must attach the excel VBA for the coding is long. I can
tell you the problem I'm facing by referring to the excel userform. Can I send to your email address instead of using the newsgroup forum? Thanks, sheela -----Original Message----- Sheela, If the following example doesn't help, please post an example of your code: This works for me: If cMan1 = cMan2 And cMan1 = cMan3 And cMod1 = cMod2 And cMod1 = cMod3 Then ' do something Else ' do something End If Sheela wrote: Hello, I have a situation here. When I break up an if..else statement in the excel worksheet, as in A < B < C to AND (A<B;B<C), it works but when I convert to VBA as in "If (A<B) And (B<C) Then" it does not work. I realized it makes a difference when I break up the condition in worksheet but how do I go about doing it in VBA? Thanks for your help. Sheela . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Structure of If...Else in VBA
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula structure | Excel Worksheet Functions | |||
Do I need to use VBA for the following control structure? | Excel Discussion (Misc queries) | |||
Help with formula structure | Excel Discussion (Misc queries) | |||
Please help me... with Case Structure | Excel Worksheet Functions | |||
Wacky Little IF Structure | Excel Discussion (Misc queries) |