• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to have a date return if two conditions are met

rjwalters

New Member
OK, working on a Excel workbook, in one cell I have todays date(E1). In another cell it will have either "NP" or "P"(J1).


Depending on the response put in J1 I need a return in J2.


What I need is that if "J1= NP" then "J2" = "E1+10"

or if "J1= P" then "J2" = "E1+3"


I do not want "E1" to update every time the workbook is opened.
 
Formula in J2 will be:

=IF(J1="NP",10,3)+E1


From your post, I'm not sure if you want E1 to always display the current date or if it's just a manual entry. If you want it to always be today's date, formula in E1 is:

=TODAY()


Does that answer your question?
 
Ok, both answers worked great...thanks..one more question, I need to only use business days. I have been trying to use the nowadays formula but not sure how to use it. I used the second suggestion and not sure where to put the statement.
 
RJWalters


Firstly, Welcome to the Chandoo.org forums.


Excel 2007+ use:
Code:
=WORKDAY.INTL(E1,IF(J1="NP",10,3))

or

Older Excel versions use: =WORKDAY(E1,IF(J1="NP",10,3))


You can also add Holidays using these functions

Refer to excel Help for the format
 
That works good , but I used the second formula. Here is what I have =if(h3="np"',a3+10,if(h3="pv",a3+3,""))......now where would I enter the formula...I tried several but always a nice little error...
 
If you always want a least some date:

=WORKDAY(A3,IF(H3="np",10,IF(H3="pv",3,0)))


If cell should be blank when H3 doesn't equal np or pv:

=IF(NOT(OR(H3="np",H3="pv")),"",WORKDAY(A3,IF(H3="np",10,3)))
 
Back
Top