ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "If" VB Syntaxe (https://www.excelbanter.com/excel-programming/300445-if-vbulletin-syntaxe.html)

Marie Lavoie

"If" VB Syntaxe
 
I should have an answer in 5 sec maximum I guess... But can't find it!!
How do I give 2 conditions (or more) to a If?

If condition1 and condition2 then
If (condition1 and condition2) then

If condition1 and if condition2 then

.. ???



Thank you.

Marie



SunTzuComm

"If" VB Syntaxe
 
Here's an example; you can also use Or instead of And:

If A = B And C = D Then
If E = F And G = H Then
... and so on
End If
End If

Regards,
Wes

Bob Phillips[_6_]

"If" VB Syntaxe
 
If A = B And C=D Then
...
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Marie Lavoie" wrote in message
...
I should have an answer in 5 sec maximum I guess... But can't find it!!
How do I give 2 conditions (or more) to a If?

If condition1 and condition2 then
If (condition1 and condition2) then

If condition1 and if condition2 then

. ???



Thank you.

Marie







All times are GMT +1. The time now is 08:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com