# IF AND Query?

#### rfletcher35

##### Active Member
I have a formula in CELL AA8 - =IF(AND(T8>=\$X\$2,V8="YES"),"x","")

In CELL T8 is Nothing but CELL V8 has YES

My understanding of the formula is that AA8 should be blank as both cases are not true, what's going wrong??

Sorry about the bold type all the way through for some reason it would not turn off!

Fletch

### Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

#### Gerald Higgins

##### Well-known Member
If both T8 and X2 are blank, then both cases ARE true, because T8=X2.

What is in X2 ?

#### rfletcher35

##### Active Member
X2 has 365 in it
T8 has nothing in it
V8 has YES in it

I only want an x in the CELL if both conditions are true

#### Matt Rogers

##### Well-known Member
Without "=" it works:

=IF(AND(V8="YES",T8>\$X\$2),"x","")

=IF(AND(V8="YES",T8>=\$X\$2),"x","")

#### live_excel

##### New Member
Please let me know what result it's showing.

#### Matt Rogers

##### Well-known Member
Have "=" inserted again.
Now it works.
Excel Workbook
TUVWXYZAA
24
3
4
5
6
7
84YESx
Sheet

#### thisoldman

##### Well-known Member
I'm guessing the problem is one that sometimes catches me—a cell that evaluates to the empty string, "", is not the same as a truly blank cell.

For number comparisons:
The empty string is greater than any number: positive, negative or zero. A truly blank cell is equal to zero.

For string comparisons:
An empty string and a truly blank cell are equal. Both are less than a non-empty text string.

Also see: http://www.mrexcel.com/forum/excel-questions/977828-if-2-cells-blank-then.html

Last edited:

#### rfletcher35

##### Active Member
But I don't have anything in T8 and it still puts an x

I don't understand, if T8 is blank.

Ahhhh unless your saying instead of blank, have a 0 in there and the formula will work???

I'll try it.

#### rfletcher35

##### Active Member
No that doesn't work either, basically I want it only to put an x if both criteria's are true so

T8 has to be equal to or greater than 365 and V8 has to say YES then but an x if both criteria's are not true then leave blank?

Anyone?

Replies
5
Views
664
Replies
7
Views
2K
Replies
1
Views
380
Replies
7
Views
444
Replies
3
Views
373

1,191,074
Messages
5,984,480
Members
439,891
Latest member
maikii

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back