# IF function using dates

Solved/Closed
Escalation Posts 3 Registration date Friday February 28, 2014 Status Member Last seen February 28, 2014 - Feb 28, 2014 at 07:00 AM
Escalation Posts 3 Registration date Friday February 28, 2014 Status Member Last seen February 28, 2014 - Feb 28, 2014 at 09:09 AM
Hi

I am trying to write an IF function for an escalation calculation and need some help please.
What I want to achieve is to have a date filled into cell B13 (22 February 2014). The IF function in cell F13 should look at the date filled into cell B13. If the date is equal or lower than the 15th of the month, the cell should display the previous month (January 2014). If it is higher it should display the current month in cell B13 (February 2014).
To explain it differently, dates 16 Month#1 to 15 Month#2 should deliver Month#1 as answer while dates 16 Month#2 to 15 Month#3 should deliver Month#2 as answer.

I would appreciate any assistance in this matter, thank you.

Kind Regards

## 1 reply

Mazzaropi Posts 1980 Registration date Monday August 16, 2010 Status Contributor Last seen December 22, 2022 146
Feb 28, 2014 at 07:44 AM
Escalation, Good morning

Try to use this:
F13 --> =IF(DAY(B13)<=15,B13-15,B13)

Attention: Use the proper separator in your excel version: Comma or semi-colon

Is it what you want?
I hope it helps.
Escalation Posts 3 Registration date Friday February 28, 2014 Status Member Last seen February 28, 2014
Feb 28, 2014 at 09:09 AM
Thank you that solution works great!