# Excel equation: If nested (true and False formula)

#### zyko_234

##### New Member
Hi,

I have an equation below that should return a 1 if true (which is working) and a 0 otherwise for any other values (which is working partially). So for some items it is returning 0 but for others it is returning a FALSE which should be a 0 if the equation was working correctly.
[FONT=&quot]
=(IF(EXACT(BQ48,"OLD"),IF(EXACT(BW48,"testoriginal"),1,0)))[/FONT]

Any help is appreciated!

Thanks!

### Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

#### Eric W

##### MrExcel MVP
Welcome to the Board!

Try:

=IF(EXACT(BQ48,"OLD"),IF(EXACT(BW48,"testoriginal"),1,0),0)

or

=IF(AND(EXACT(BQ48,"OLD"),EXACT(BW48,"testoriginal")),1,0)

#### Fluff

##### MrExcel MVP, Moderator
If they both need to be true, try
=IF(AND(EXACT(BQ48,"OLD"),EXACT(BW48,"testoriginal")),1,0)

#### Eric W

##### MrExcel MVP
If you're comfortable with Boolean algebra, you could even use:

=EXACT(BQ48,"OLD")*EXACT(BW48,"testoriginal")

Replies
3
Views
91
Replies
8
Views
108
Replies
24
Views
126
Replies
24
Views
1K
Replies
1
Views
66

1,109,360
Messages
5,528,245
Members
409,809
Latest member
VICKRAM

### This Week's Hot Topics

• Change military grades into rank
Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
• VBA COUNTIF SOLUTION
Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
• INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...