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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
54,272
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
175
Office Version
  1. 365
Platform
  1. Windows
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
54,272
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
54,272
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.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,558
Messages
5,832,455
Members
430,136
Latest member
Asir Jefferson

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