Problem with if(and( function and my results

ladbroke

Board Regular
Joined
Jun 2, 2006
Messages
175
Office Version
  1. 365
Platform
  1. Windows
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?

Please help.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
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?
 
Upvote 0
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.
 
Upvote 0
Try the formula again in a fresh worksheet with some numbers manually entered in E43, F43, R43, T43, U43 and V43
 
Upvote 0
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:
Upvote 0
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)
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top