Thread: IF
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Keithlo Keithlo is offline
external usenet poster
 
Posts: 62
Default IF

It's not very intuitive, but it goes like this:

If(And(Condition1,Condition2,Condition3),Then,Else ).

The "Or" function works the same way.

This is not how it would be done if you were using VBA code, but that's how
it's done for the Excel function.

It's important to have your parentheses in the right place too, especially
when using the "Or" function, and when mixing "And" and "Or" functions.

Hope this helps.

Keith



"geebee" wrote:

hi,

i have a cell in my worksheet that i am trying to do someting with ...
trying to add "AND" in the IF statement calculation

IF(sheet!B3 = "(ALL)", "specific", sheet!B3)

I tried the follwing but got an error:
IF(sheet!B3 = "(ALL)" AND sheet!W3 = "(ALL)", "specific", sheet!B3)

how can i add the "AND"?

thanks in advance,
geebee