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.

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

neverbe 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

subtract12 otherwiseadd120"?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.

Ask Your Question

Weekly Poll

How long do you think until flying cars or taxis are common?

Discuss in The Lounge

Poll History