Add months with rules.....

buddy1000

Active Member
Joined
Oct 31, 2007
Messages
294
I have this formula..

=WORKDAY(DATE(YEAR($Z$10),MONTH($Z$10)+6,DAY($Z$10)+0)-1,1,'Holidays'!A2:A60)

It looks at date Z10 and adds 6 months. If this results is a weekend or a holiday it returns the next workday. In column Z, I have different dates. Now I have to change the 6 to 12 to 18 months etc. etc.

Is it possible to alter it to do this automatic? I tried to use rOW but got lost a bit.

Any ideas?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

which cell is this formula in? and which cells do you want the 12 and 18 months to be in. I'm sure there is a way of using row. (there will be a different way for sure.)
 
Upvote 0

buddy1000

Active Member
Joined
Oct 31, 2007
Messages
294
Formula is in cell A2
add 12 months should be in A3
add 18 months should be in A4
add 24 months should be in A5
etc.
etc.
 
Upvote 0

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

in A2 enter

=WORKDAY(DATE(YEAR($Z$10),MONTH($Z$10)+(ROW()-1)*6,DAY($Z$10)+0)-1,1,'Holidays'!A2:A60)

and copy down as far as required.

Is this giving expected results?
 
Upvote 0

buddy1000

Active Member
Joined
Oct 31, 2007
Messages
294
PERFECT...
but now lets say that instead of A2, it should be in Z11.

What changes in the formula.
 
Upvote 0

barry houdini

MrExcel MVP
Joined
Mar 23, 2005
Messages
20,825
Perhaps use EDATE to simplify, e.g. in Z11 copied down

=WORKDAY(EDATE(Z$10,6*ROWS(Z$11:Z11))-1,1,'Holidays'!A$2:A$60)
 
Upvote 0

Forum statistics

Threads
1,191,346
Messages
5,986,134
Members
440,004
Latest member
Dynawoman

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
Top