Solved How to create formula with date and values

June 14, 2017 at 14:22:06
Specs: Windows 8
Hi there

I am trying to insert a formula to populate a value (as a number) comparing dates.
for e.g.

Scenario
Start Date for a contract is 24/06/2015, comparing with month end dates for e.g. 31/05/2015, 30/06/2015 and so on
Formula required to get me to a number e.g. if 24/06/2015 is less than or equal to 31/05/2015, then don't add 120 and -12.

Can you please help.


See More: How to create formula with date and values

Report •

#1
June 15, 2017 at 06:05:45
✔ Best Answer
re: "Formula required to get me to a number e.g. if 24/06/2015 is less than or equal to 31/05/2015, then don't add 120 and -12."

It's not clear to me what you are trying to do.

First: "If 24/06/2015 is less than or equal to 31/05/2015"

24/06/2015 will never be less than or equal to 31/05/2015, so I assume you mean that you will be using cell references, not actual dates, e.g. "If A1 is less than or equal to B1 then..."

Second: "don't add 120 and -12"

You've mixed "words" and "mathematical operators", so I'm confused. Do you mean "If A1 is less than or equal to B1 then subtract 12 otherwise add 120"?

Third: What are you performing the mathematical operation on? Are you performing the operation on the value of another cell? e.g.

"If A1 is less than or equal to B1 then subtract 12 from C1 otherwise add 120 to C1"

If that is correct, then try this:

=IF(A1<=B1,C1-12,C1+120)

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Report •
Related Solutions


Ask Question