IF AND Not working correctly

danniaus

New Member
Joined
Jun 2, 2016
Messages
20
Hello

In Column Meter Type I have the following formula

=IF(AA2="LARGE",AND(AC2={"BASIC","MRIM"}),"Meter Requires Upgrade")

What I am trying to say is that if Column Classification contains the value "LARGE" AND column Meter Installation Code Contains the value "BASIC" OR "MRIM" then mark "Meter Requires Upgrade"

This doesn't appear to be working right as it only meeting one condition "LARGE"
ClassificationStateMeter Installation CodeEligible for Pricing?NMI Acquisition or RenewalThreshold CalculationMeter Type
LARGE VIC SMALLEligible for Pricing>100Meter Requires Upgrade

<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>
</tbody>

Any help is appreciated

Thanks

Danni
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,022
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
MAybe this

Code:
=IF(AND(AA2="LARGE",OR(AC2={"BASIC","MRIM"})),"Meter Requires Upgrade","METER OK")
 

joeu2004

Banned user
Joined
Mar 2, 2014
Messages
3,080
Office Version
  1. 2010
Platform
  1. Windows
[.... deleted by me .... michael beat me to it ....]
 
Last edited:

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,022
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
Ha !....that would be a first. !!..:LOL:
 

danniaus

New Member
Joined
Jun 2, 2016
Messages
20

ADVERTISEMENT

Hi Michael,

Thanks for the quick reply.

Hmm this didn't work, it says Meter OK as the result. Because AA2 says LARGE AND AC2 = Basic it should say Meter Requires Upgrade...
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,022
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
IS BASIC or basic....there is a difference ??
BASIC needs to be in capitals !
 

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
21,022
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
Works fine for me !
But if there is anything in AA2 apart from LARGE, it will say "meter OK"
So maybe another condition is required for AA2 ??

Code:
=IF(AND(AA2="LARGE",OR(AC2={"BASIC","MRIM"})),"Meter Requires Upgrade","METER OK")
 
Last edited:

Forum statistics

Threads
1,144,611
Messages
5,725,308
Members
422,608
Latest member
bswg5882

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