Need help with an IF function

Solved/Closed
AY44 Posts 3 Registration date Wednesday August 7, 2013 Status Member Last seen August 7, 2013 - Aug 7, 2013 at 12:57 PM
AY44 Posts 3 Registration date Wednesday August 7, 2013 Status Member Last seen August 7, 2013 - Aug 7, 2013 at 04:17 PM
So, I am trying to get this formula to work.

The situation is that one of our items have changed names. In the spreadsheet, I am trying to get a formula to automatically change the name to the correct one. This is what I have so far.

=IF(AN1="X",IF(D1>=1/1/2013,"Y","X"),AN26)

AN= the column that has the product name as it would be able to be purchased now, even if it was purchased under a different name.
D= the date the item was purchased.
1/1/2013 is the date the current name was first started to be used in our system.
X is the current name
Y is the old name

My problem is that with the above formula, everything still comes as the old item name "Y" - so what am I doing wrong?

4 responses

Blocked Profile
Aug 7, 2013 at 03:00 PM
=IF(A1="X",IF(D1>=DATE(2013,1,1),"X","Y"),AN26)

put the date in there
1
Blocked Profile
Aug 7, 2013 at 02:13 PM
good afternoon,

Take a look at your logic, a nested if is still an if. so your logic is written:

=if(logic,true=if(logic,true,false),false)

so, your second logic statement says:
if date is greater than or equal to 1/1/2013 then "Y".

So that is why you are still getting "Y".

Reverse the Y and X in the second statement.
0
AY44 Posts 3 Registration date Wednesday August 7, 2013 Status Member Last seen August 7, 2013
Aug 7, 2013 at 02:39 PM
So, I did as you suggested, changed the formula to:

=IF(AN1="X",IF(D1>=1/1/2013,"X","Y"),AN26)

And instead of getting all of the X's to become Y's, now everything is X. The formula seems to not be looking at the date that is in D1.

Any other help with this one?
0
AY44 Posts 3 Registration date Wednesday August 7, 2013 Status Member Last seen August 7, 2013
Aug 7, 2013 at 04:17 PM
Now it works! Thank you SOOO MUCH!
0