IF(And statement not showing correct result

JREYNA03

New Member
Joined
Nov 22, 2023
Messages
34
Office Version
  1. 2016
Platform
  1. Windows
I noticed that when I conditions change the result of "Adjustment", "Do Not adjust" does not change

=IF(AND(G2="Complete",N2="TRUE",O2="TRUE",P2="TRUE",Q2="True",R2="True"),"Do Not Adjust", "Adjust")
if(And.PNG
Statement.PNG
 
You already have it. An IF has three arguments:
=IF(condition to check,what to return if condition is true,what to return if condition is false)

You have "Do Not Adjust" as your 2nd argument and "Adjust" as your third argument.
If what you said in post 5 is true, then you just need to change those two arguments around.
 
Last edited:
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
You had this:

Excel Formula:
=IF(AND(G2="Complete",N2="TRUE",O2="TRUE",P2="TRUE",Q2="True",R2="True"),"Do Not Adjust", "Adjust")

but it seems it should have been:

Excel Formula:
=IF(AND(G2="Complete",N2="TRUE",O2="TRUE",P2="TRUE",Q2="True",R2="True"), "Adjust","Do Not Adjust")
 
Upvote 0
You already have it. An IF has three arguments:
=IF(condition to check,what to return if condition is true,what to return if condition is false)

You have "Do Not Adjust" as your 2nd argument and "Adjust" as your third argument.
If what you said in post 5 is true, then you just need to change those two arguments around.
if(And.PNG

Not working
 
Upvote 0
Q2 contains 1, not TRUE, so not all your conditions are met, and therefore you get the "Adjustment needed" result.
 
Upvote 0
You had this:

Excel Formula:
=IF(AND(G2="Complete",N2="TRUE",O2="TRUE",P2="TRUE",Q2="True",R2="True"),"Do Not Adjust", "Adjust")

but it seems it should have been:

Excel Formula:
=IF(AND(G2="Complete",N2="TRUE",O2="TRUE",P2="TRUE",Q2="True",R2="True"), "Adjust","Do Not Adjust")
When the variance adjustment is made the result doesn't update almost like it doesn't recognize the cell.
 
Upvote 0
I shouldn't have copied from your original formula as I forgot you had quotes in there:

Excel Formula:
=IF(AND(G2="Complete",N2=TRUE,O2=TRUE,P2=TRUE,Q2=True,R2=True), "Adjust","Do Not Adjust")

but again note that 1 does not equal TRUE, and column Q appears to have numbers in it, not True/False values.
 
Upvote 0
I shouldn't have copied from your original formula as I forgot you had quotes in there:

Excel Formula:
=IF(AND(G2="Complete",N2=TRUE,O2=TRUE,P2=TRUE,Q2=True,R2=True), "Adjust","Do Not Adjust")

but again note that 1 does not equal TRUE, and column Q appears to have numbers in it, not True/False values.
I see the Q2. I adjusted that one.
When the variance adjustment is made the result doesn't update almost like it doesn't recognize the cell.
if(And.PNG
 
Upvote 0
Again, you need to remove the quotes around True in your formula.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,447
Messages
6,172,202
Members
452,448
Latest member
Tupacandres

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