View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Multiple IF conditions-AND/OR

Try

a = 1
b = 2
c = 5

If a = 1 And b = 2 And (c = 3 Or c = 4 Or c = 5) Then
MsgBox "Success"
End If

--
Jacob


"richzip" wrote:

Hello,

I have the following If/Then statement set up.

If (Cond1) and (Cond2) and (Cond3a) or (Cond3b) or (Cond3c) Then

I want the "then" to be fulfilled only if BOTH Conditions 1 AND 2, as well
as "at least one" of the # 3 conditions are true. How would I properly use
and/or combinations as well as parenthese/brackets?

I thought it might be something like this, but it didn't work:

If (Cond1) and (Cond2) and [(Cond 3a) or (Cond3b) or (Cond3c)] Then