Add 2 or 3 months depending on day entered in a cell

cluessreid

New Member
Joined
Jan 10, 2019
Messages
1
I have an invoice built in Excel. On that sheet I have a start date (cell M11) that is formatted as a Date in the mm/dd/yy format. I have another cell (M42) that I need to enter a formula so that if the day in M11 is before the 15th it add 2 months or if the day is equal to or later then that 15th it adds 3 months.

For example - I enter 2/2/2019 in M11, as the day is before the 15th I need M42 to return the value April 2019. I'd prefer it didn't return a specific day - but if needed it's needs to always show the 15th of the month.

If I enter 2/16/19 in M11, as the day is after the 15th I need M42 to return the value May 2019. Again, I'd prefer the value to show just May 2019 but if needed it needs to always show the 15th of the month.

I think I've tried everything and can't get it to work!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
PHP:
=DATE(YEAR(M11),MONTH(M11)+IF(DAY(M11)<14,2,3),15)

You can format the cell as "mmm yy" so that the day isn't displayed, or wrap the entire formula in a TEXT function:
PHP:
=TEXT(DATE(YEAR(M11),MONTH(M11)+IF(DAY(M11)<14,2,3),15),"mmm yy")
 
Upvote 0
=EOMONTH(M11,(DAY(M11)>15)+1)+15

Format cell as mmm yyyy
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,987
Members
452,373
Latest member
TimReeks

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