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"
[TABLE="class: grid, width: 1082"]
<colgroup><col span="2"><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Classification[/TD]
[TD]State[/TD]
[TD]Meter Installation Code[/TD]
[TD]Eligible for Pricing?[/TD]
[TD]NMI Acquisition or Renewal[/TD]
[TD]Threshold Calculation[/TD]
[TD]Meter Type[/TD]
[/TR]
[TR]
[TD]LARGE [/TD]
[TD]VIC [/TD]
[TD]SMALL[/TD]
[TD]Eligible for Pricing[/TD]
[TD][/TD]
[TD]>100[/TD]
[TD]Meter Requires Upgrade[/TD]
[/TR]
</tbody>[/TABLE]

Any help is appreciated

Thanks

Danni
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
MAybe this

Code:
=IF(AND(AA2="LARGE",OR(AC2={"BASIC","MRIM"})),"Meter Requires Upgrade","METER OK")
 
Upvote 0
[.... deleted by me .... michael beat me to it ....]
 
Last edited:
Upvote 0
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...
 
Upvote 0
IS BASIC or basic....there is a difference ??
BASIC needs to be in capitals !
 
Upvote 0
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:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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