Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofill using variables
Hi,
Please tell me what is wrong with the below statements. I'm positive that it is a trivial error but I cant seem to figure this out. This code works fine if I use absolute cells references i.e "D1:D7" rather than pasteMonthStart, & pasteMonthEnd. ActiveCell.Offset(0, 3).Select ActiveCell.FormulaR1C1 = "=TEXT(RC[-3],""mmmmmmmmm_yyyy"")" Range(pasteStart).Select Selection.AutoFill Destination:=Range("pasteMonthStart, & pasteMonthEnd") Thank you kindly Deecrypt |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofill using variables
Try:
Selection.AutoFill Destination:=Range(pasteMonthStart, pasteMonthEnd) Mike F "Deecrypt" wrote in message ups.com... Hi, Please tell me what is wrong with the below statements. I'm positive that it is a trivial error but I cant seem to figure this out. This code works fine if I use absolute cells references i.e "D1:D7" rather than pasteMonthStart, & pasteMonthEnd. ActiveCell.Offset(0, 3).Select ActiveCell.FormulaR1C1 = "=TEXT(RC[-3],""mmmmmmmmm_yyyy"")" Range(pasteStart).Select Selection.AutoFill Destination:=Range("pasteMonthStart, & pasteMonthEnd") Thank you kindly Deecrypt |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Autofill using variables
Thanx for your prompt reply Mike,
I tried your solution but was unsuccessful. Eventually found the below solution so am displaying that for the benefit of all. Range(pasteMonthStart).Select Selection.AutoFill Destination:=Range(pasteMonthStart & ":" & pasteMonthEnd) Thank you Deecrypt Mike Fogleman wrote: Try: Selection.AutoFill Destination:=Range(pasteMonthStart, pasteMonthEnd) Mike F "Deecrypt" wrote in message ups.com... Hi, Please tell me what is wrong with the below statements. I'm positive that it is a trivial error but I cant seem to figure this out. This code works fine if I use absolute cells references i.e "D1:D7" rather than pasteMonthStart, & pasteMonthEnd. ActiveCell.Offset(0, 3).Select ActiveCell.FormulaR1C1 = "=TEXT(RC[-3],""mmmmmmmmm_yyyy"")" Range(pasteStart).Select Selection.AutoFill Destination:=Range("pasteMonthStart, & pasteMonthEnd") Thank you kindly Deecrypt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Not at all clear on use of variables and/or object variables | Excel Discussion (Misc queries) | |||
autofill with variables trouble | Excel Programming | |||
Autofill: Need to autofill one week block, (5) weekday only into cells. | Excel Discussion (Misc queries) | |||
Autofill | Excel Worksheet Functions | |||
Q. Autofill question: Can I autofill alpha characters like I can numbers? | Excel Programming |