# IF formala -- true/false ... or equal???

#### zimbielou

##### New Member
I am working on a formula that needs to tell me the following:

If A>B then true
If A<B then false

BUT ALSO: if A=B then neither true or false (a third output)

Am I barking up the wrong tree with the IF formula? Will it only give me two outputs for greater than or less than? Is there a way to demonstrate a third output when A and B are equal?

Total Excel dummy here and could really use help.

Lindsey

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### NBVC

##### Well-known Member
You can use a nested IF,

e.g. =IF(A1>B1,do this,IF(A1=B1,do this,do that))

Is this what you mean? If not, please specify your exact conditions (ie. what is to happen and when).

#### zimbielou

##### New Member
Yes. Exactly. Thank you so much!

Replies
7
Views
192
Replies
9
Views
49
Replies
4
Views
75
Replies
8
Views
157
Replies
2
Views
37