IF yes Formula

rockyw

Well-known Member
Joined
Dec 26, 2010
Messages
1,196
Office Version
  1. 2010
Platform
  1. Windows
Is there a way I can have a cell look at 3 cells, if one is marked my a X or a yes, it returns todays date plus 1,2 or just N/A. Each cell would be differant, one the +1, one cell the +2 and the other cell return the N/A. Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
I tried this but it only retuns NAME

Code:
=IF(D32=yes,NOW()+1,0)
 
Upvote 0
I get the date even if yes is not in the cell. Is there something I need to do? Thanks
 
Upvote 0
This should just be a series of nested IFs. But, can more than one cell have an X? If so, which one takes precedence?

This formula will test the cells in the order you gave

X's go in A1, B1, C1, formula in D1:

=If(Or(A1="X",A1="Yes), Today()+1, If(Or(B1="X",B1="Yes), Today()+2, If(Or(C1="X",C1="Yes), "N/A","")))

hope I got all the parenthesis right!
 
Upvote 0
I tried this but it only retuns NAME

Code:
=IF(D32=yes,NOW()+1,0)
Your initial post is hard to decipher! :confused:

Try this...

=IF(D32="yes",NOW()+1,0)

When you use TEXT in a formula it needs to be quoted such as "yes".

Are you sure you want to use NOW()?

Now() returns the date plus the time.

TODAY() returns just the date.

=IF(D32="yes",TODAY()+1,0)
 
Upvote 0
Sorry, I made it more simple. I have 3 shipping choices, 1, 2 or ground. I have 3 cells after need delivered by, I would like the cell to return today + 1 or 2 day, or for ground N/A. So I would have 3 formulas, each looking at one cell. For next day, I need today + 1 day for the dat. The formula
=IF(D32="yes",TODAY()+1,0) Returns the date all the time even if there is no yes. I must have something wrong. Thanks for the help.
 
Upvote 0
Chris
This gets an error, and no only one cell would have an X at a time. Thanks

=If(Or(A1="X",A1="Yes), Today()+1, If(Or(B1="X",B1="Yes), Today()+2, If(Or(C1="X",C1="Yes), "N/A","")))
 
Upvote 0
OK here is the foemula with the cells I am using.

Code:
=IF(OR(D33="X",B33="Yes"), TODAY()+1, IF(OR(D34="X",D34="Yes"), TODAY()+2, IF(OR(D35="X",D35="Yes"), "N/A","")))

I added " on the other side of the Yes", I gave an error before. Thanks
This is in F38. Thanks
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

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