Problem with if(and( function and my results

ladbroke

Board Regular
Joined
Jun 2, 2006
Messages
167
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.
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
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?
 

ladbroke

Board Regular
Joined
Jun 2, 2006
Messages
167
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.
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
Try the formula again in a fresh worksheet with some numbers manually entered in E43, F43, R43, T43, U43 and V43
 

Noodleski

Active Member
Joined
Nov 18, 2015
Messages
467

ADVERTISEMENT

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:

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
47,926
Office Version
  1. 365
Platform
  1. Windows
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)
 

Noodleski

Active Member
Joined
Nov 18, 2015
Messages
467
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,047
Messages
5,599,497
Members
414,315
Latest member
Yolanda5050

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
Top