Full Version: Range Autofill
UtterAccess Discussion Forums > Microsoft® Office > Microsoft Excel
mjschukas

i'm using (below) to fill a range of cells with the numbers and formulas in row 9 (works well):

Range("a9:bu9").AutoFill Destination:=Range("a9:bu" & myrow)


but i have one column that has the numerica value of 0 and i want this to copy down,
but instead, an arithmetic sequence copies down (0,1,2,3...)

what can i do to stop the sequence and just copy down the 0?

???

thank you.
ipisors
Check out the help files regarding Range.Autofill method. specifically, xlAutoFillType
Bob G
what you could do is copy the cell once. that would give you 2 cells with a 0. then use both of those to copy down. Because the cells are the same they would not increment as you are seeing.
ipisors
Or just correctly use AutoFill....
CODE
Range("a9:bu9").AutoFill Destination:=Range("a9:bu" & myrow), Type:=xlFillCopy
mjschukas
thank you...!

"works like a charm"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.