View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Shan Shan is offline
external usenet poster
 
Posts: 14
Default Can I use an IF statement to reference 2 different cells?

Sigh. I knew it would be as easy as that, but I looked at it too long and it
seemed complicated.

Thank you! It works.

"Vaughan" wrote:

Its not exactly clear what you're trying to do, but you can probably get what
you want with embedded IF statements.

e.g.

IF(B24=0.01,6,IF(B25=0.01,8,5))

If you want to test whether both B24=0 and B25=0, use the AND() statement:

IF(AND(B24=0,B25=0), 8,5)

Similarly, if you want to know if either B24 or B25 =0

IF(OR(B24=0,B25=0),6,5)


"Shan" wrote:

I have the following formula in cell I39 which works great and does what it
is supposed to do:

=IF(B24=0.01,5+1,5)

However, I also want this formula to reference cell B25 as well with a
little different calculation:

=IF(B25=0.01,5+3,5)

How can I combine these 2 formulas so it will check both B24 and B25 and
return 1 result in cell I39?