How to round dates up?

imdt3000

New Member
Joined
Dec 16, 2010
Messages
6
I need to round all dates that are between the 2nd and 15th (both #'s included) up to the 15tht and all dates that are between the 16th to the 31st (both #'s included) to the 1st of the next month.
Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Try:

=IF(AND(DAY(A1)>=2,DAY(A1)<=15),VALUE(15&"/"&MONTH(A1)&"/"&YEAR(A1)),VALUE(1&"/"&MONTH(A1)+1&"/"&YEAR(A1)))
 
Upvote 0
Perhaps

=DATE(YEAR(A1),MONTH(A1)+(DAY(A1)>15),LOOKUP(DAY(A1),{1,2,16},{1,15,1}))
 
Upvote 0
Thanks Danny but doesn't give me a correct answer. For example in i put 12/27/10 i got 1/13/10. It should be 1/1/11.
I was trying =IF(AND(DAY(B9)>1,DAY(B9)<=15),DATE(YEAR(B9),MONTH(B9),15),DATE(YEAR(B9),MONTH(B9)+1,1)) but only get the date to the 1st but can't get the 15th.
 
Upvote 0
So if B9 is 1st or 15th the formula should return the same date? Try this

=IF(DAY(B9-1)<15,B9-DAY(B9)+15,B9+17-DAY(B9+16))
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,148
Members
448,552
Latest member
WORKINGWITHNOLEADER

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