ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   copying formula into non-adjacent cells, EXCEL2003 (https://www.excelbanter.com/excel-discussion-misc-queries/33348-copying-formula-into-non-adjacent-cells-excel2003.html)

jacob

copying formula into non-adjacent cells, EXCEL2003
 
Is it possible to duplicate the following formula into every 16th cell
along the A column without manually entering and changing every
occurrence??

=WORKDAY(A3,1)

Starting with A8, I need it do read =WORKDAY(A3,1)
A24 I need =WORKDAY(A3,2)
A40 I need =WORKDAY(A3,3)and so on, thru like A 496.

Sincerely,

Jacob


Dave Peterson

I'd use a little macro:

Option Explicit
Sub testme()
Dim iRow As Long

For iRow = 8 To 496 Step 16
ActiveSheet.Cells(iRow, "A").Formula _
= "=WORKDAY(A3," & (iRow + 8) / 16 & ")"
Next iRow

End Sub

But my last cell that I used was A488.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

jacob wrote:

Is it possible to duplicate the following formula into every 16th cell
along the A column without manually entering and changing every
occurrence??

=WORKDAY(A3,1)

Starting with A8, I need it do read =WORKDAY(A3,1)
A24 I need =WORKDAY(A3,2)
A40 I need =WORKDAY(A3,3)and so on, thru like A 496.

Sincerely,

Jacob


--

Dave Peterson


All times are GMT +1. The time now is 11:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com