Calculation for first of a month

sellis

New Member
Joined
May 17, 2011
Messages
33
I am using a calculation to add 60 days to a date, and then I need the first day of the month following that calculated date. I can get the 60 days no problem. It is getting the first of the month following that date I am having issues with. Any ideas??
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Do you have a suggestion to deal with the rare times when the +60 calculation returns a date that is the first of a month and I need to keep that date?

Yeah - that worked perfectly except for the calculations that had already returned the first of the month just because that was the +60 and I need those to stay on the +60 day and not be calculated to the first of the next month. Any ideas there?
 
Last edited:
Upvote 0
We can just add an IIF statement to decide whether or not to add one to the month depending on the date of Date + 60:

FirstDay: DateSerial(Year([DateField]+60),Month([DateField]+60)+IIF(Day([DateField]+60)=1,0,1),1)
 
Upvote 0
I love this posting board. You and one other gentleman have solved two problems that I have been working for hours on. I appreciate your help more than you will ever know!!! Thanks soooo much. :biggrin:
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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