Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I want to autofill a formula down 17 rows, however my couln will be different
each time. Is their a way I can specify the distance to autofill with out putting in the column exactly. Heres my code so far: Do If IsEmpty(DestCell.Value) Then Exit Do Else Set DestCell = DestCell.Offset(0, 1) End If Loop DestCell.FormulaR1C1 = "=RC[-2]-RC[-1]" ActiveCell.Select Selection.AutoFill Destination:= any suggestions? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can you use a certain row to determine the next available column? I like to
start at the far right and come back to the last used column, then come to the right one column: Dim Destcell as range with worksheets("sheet9999") set destcell = .cells(1,.columns.count).end(xltoleft).offset(1,0) end with destcell.resize(17,1).formular1c1 = "=RC[-2]-RC[-1]" If you can't use the .end(xltoleft), then the destcell.resize(17,1) may be all you need??? Jase wrote: I want to autofill a formula down 17 rows, however my couln will be different each time. Is their a way I can specify the distance to autofill with out putting in the column exactly. Heres my code so far: Do If IsEmpty(DestCell.Value) Then Exit Do Else Set DestCell = DestCell.Offset(0, 1) End If Loop DestCell.FormulaR1C1 = "=RC[-2]-RC[-1]" ActiveCell.Select Selection.AutoFill Destination:= any suggestions? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Maybe something like this Selection.AutoFill Destination:=Range(Selection, Selection.Offset(16, 0)) If this helps, please click the Yes button. -- Thanks, Shane Devenshire "Jase" wrote: I want to autofill a formula down 17 rows, however my couln will be different each time. Is their a way I can specify the distance to autofill with out putting in the column exactly. Heres my code so far: Do If IsEmpty(DestCell.Value) Then Exit Do Else Set DestCell = DestCell.Offset(0, 1) End If Loop DestCell.FormulaR1C1 = "=RC[-2]-RC[-1]" ActiveCell.Select Selection.AutoFill Destination:= any suggestions? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
autofill or auto reference | Excel Discussion (Misc queries) | |||
Auto-populate, Auto-copy or Auto-fill? | Excel Worksheet Functions | |||
How to AUTO SAVE as opposed to turning on auto recovery: EXCEL | Excel Discussion (Misc queries) | |||
Autofill: Need to autofill one week block, (5) weekday only into cells. | Excel Discussion (Misc queries) | |||
excel links update not working in auto, calculations in auto | Excel Worksheet Functions |