# Problem with if(and( function and my results

##### Board Regular
I have this formula =IF(AND(E43>=F43,R43>=T43),V43,U43)

My understanding would be that it checks if the number in E43 is bigger than or equal to F43 and the same with R43 and T43. If it is true, it should return the value in V43, whereas if its wrong it returns U43.
My issue is, it doesn't return the values in U and V. It returns 'True' or 'False'.

Where am I going wrong?

### Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
The only way I can see the formula returning those results is if V43 and U43 contain "True" and "False".
What do you have in those 2 cells?

Numbers.

One is a positive number, whilst the other is a negative number.

I didn't think I was writing it wrong but I can't think why it does that.

If you see nothing wrong in it, then I may have to find another solution to my spreadsheet even if it means doing a couple of extra formulas.

Thanks anyway.

Try the formula again in a fresh worksheet with some numbers manually entered in E43, F43, R43, T43, U43 and V43

Seems like the AND function hasn't been closed properly. Sure the brackets are in the right place?

=IF(AND(E43>=F43,R43>=T43),V43,U43)

is not the same as

=IF(AND(E43>=F43,R43>=T43,V43,U43))

Last edited:
Seems like the AND function hasn't been closed properly. Sure the brackets are in the right place?

=IF(AND(E43>=F43,R43>=T43),V43,U43)

is not the same as

=IF(AND(E43>=F43,R43>=T43,V43,U43))
But that second formula isn't a valid one and can't be entered can it?

One way that True/False could be returned would be if the IF() function was missing & the brackets are placed as follows:

=AND(E43>=F43,R43>=T43,V43,U43)

Hm, true. I was thinking a different environment where I struggled with the same issue, where there wasn't syntax verification. Seemed plausible at the time.

Replies
1
Views
260
Replies
2
Views
194
Replies
2
Views
181
Replies
4
Views
281
Replies
2
Views
232

1,217,502
Messages
6,137,015
Members
450,038
Latest member

### 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