Billing Formula: If date is greater than 10..

pherman

New Member
Joined
Jan 11, 2018
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello there!
I'm trying to make a spreadsheet that would automatically populate a cancellation effective date. If a product is cancelled on the 10th day of the month or less, than the cancellation effective date should be the last day of the current month. If the cancellation is greater than the 10th, the cancellation effective date should be the last day of the following month.

For example:
Product cancellation was received on the 1/9/2018, cancellation effective date 1/31/2017
Product cancellation received on 1/11/2018, cancellation effective date 2/28/2018

I had previously searched for an answer and found a fomula that will give me the end of of the current month but I can't figure out how to add into the equation a date for the following month.

=IF(DAY(E4)<=10,DATE(YEAR(E4),MONTH(E4),30),DATE(YEAR(E4),MONTH(E4)+1,0))

Your help is much appreciated!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Welcome to the Board!
This should do what you want:
Code:
=IF(DAY(E4)<=10,DATE(YEAR(E4),MONTH(E4)+1,0),DATE(YEAR(E4),MONTH(E4)+2,0))
 
Upvote 0
pherman, Good afternoon.

Dear Joe4, Good afternoon.

My suggestion is:
Code:
=IF(DAY(E4)<=10, EOMONTH(E4,0), EOMONTH(E4,1))

I hope it helps.
 
Upvote 0
Marcilio,

Yes, I forgot about the EOMONTH function that was introduced with Excel 2007. As long as they are not using an older version Excel, that would be the simplest way to go.

If, by chance, you are using an older version of Excel, I was able to simplify my original formula a little:
Code:
=DATE(YEAR(E4),MONTH(E4)+IF(DAY(E4)<=10,1,2),0)
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

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