Two conditions in one IF statement

  • Thread starter Thread starter shashi1515
  • Start date Start date
S

shashi1515

Can I have two conditional statements in a IF statement.

Ex: if (condition A) or (condition B) then

do this

elseif (conditions c) and (condition D) then

do this

endif


How do I write in this syntax. Please let me know.

Thanks,
Shashi
 
you can use the or statement in your if

=IF(OR('Cell1'=1,'Cell2'=1),"True Case","False Case")

you can do a similar thing with the AND statement as well

hope this helps

rgds

mark
 
Sure
if range("a1")=1 or range("b1")=2 then
do this
elseif
if range("c1")=3 and range("d1")=4
do that
end if
 
Back
Top