And with If statement not working

topswim

Board Regular
Joined
May 14, 2002
Messages
133
Office Version
  1. 365
Platform
  1. Windows
Below I have a formula using the AND function with my IF statement (Y35), but notice it is not performing correctly. I should of returned A35 and not ??. Trying to understand why this is not functioning correctly. Hopefully this issue will resolve my vlookup issue where, for example=vlookup(w35,A:B,{1,2},false), is only bringing back A35 instead of A35 and B35.

Y35 A35 B35 C35 w35 X35 IF(AND(X35=0,W35="N"),A35,"??")
AZGIL06E03123AZGIL06E03N0??
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Is the zero in X35 a calculated value? if it is you could try changing your if statement to something like this:
= IF(AND(X35<0.000001,X35 >-0.000001,W35="N"),A35,"??")
 
Upvote 0
Yes it is. I did try yours as well Offthelip and even replaced X35 with 0, instead of the formula and still same result.
 
Upvote 0
Yes it is. I did try yours as well Offthelip and even replaced X35 with 0, instead of the formula and still same result.
I also see what I posted shifted my cell names (A,B,C,W,X and Y) back to the left. They should be spread out accordingly to the columns
 
Upvote 0
The equation works for me, so the only other possibility I can think of is: Have you got calcuation set to manual?
 
Upvote 0
Check that you don't have any leading/trailing spaces in W35
 
Upvote 0
The equation works for me, so the only other possibility I can think of is: Have you got calcuation set to manual?
No, but I have even double check and click Calculate Now. Is it a possible setting in Excel that I may be missing?
 
Upvote 0
There is nothing wrong with the formula.
+Fluff 1.xlsm
ABCWXY
34
35AZGIL06E03123AZGIL06E03N0AZGIL06E03
Main
Cell Formulas
RangeFormula
Y35Y35=IF(AND(X35=0,W35="N"),A35,"??")


so it must be the data, assuming you are looking at the right cells.
 
Upvote 0
There is nothing wrong with the formula.
+Fluff 1.xlsm
ABCWXY
34
35AZGIL06E03123AZGIL06E03N0AZGIL06E03
Main
Cell Formulas
RangeFormula
Y35Y35=IF(AND(X35=0,W35="N"),A35,"??")


so it must be the data, assuming you are looking at the right cells.
Yes, I am looking at the correct cell. I'm just not sure what is causing this issue? I even rebooted to see if that might resolve, but no.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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