Display month based on calculations

Hawkeyes26

New Member
Joined
Aug 30, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I need a formula that will display “if a selected date +21 days is at least 30 days from the 1st of the next month, then display the next month. If less than 30 days from the first of the next month, then display the next month + 1 month.”

For example, if a selected date is 9/11, then 21 days from that date would be 10/1. Since this is 30 days from the next month, 11/1, then I need to display 11/1.

If a selected date is 9/17, then 21 days from that date would be 10/7. Since 10/7 is less than 30 days from the next month, 11/1, I need to display 12/1:
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
try this:

Mr excel questions 58.xlsm
ABCDEF
1
2
3Selected Date21 Days DateDays to Next MonthDesired ResultFORMULA
42023-09-112023-10-02302023-11-012023-11-01
52023-09-172023-10-08242023-12-012023-12-01
Hawkeyes26
Cell Formulas
RangeFormula
C4:C5C4=B4+21
D4:D5D4=EOMONTH(C4,0)+1-C4
F4:F5F4=IF(EOMONTH(B4+21,0)+1-(B4+21)<30,EOMONTH(B4+21,1)+1,EOMONTH(B4+21,0)+1)
 
Upvote 0

Forum statistics

Threads
1,225,627
Messages
6,186,100
Members
453,337
Latest member
fiaz ahmad

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