Name
range.AutoFill(Destination, [Type])
Synopsis
Automatically fills in the cells in a specified destination range based on the specified source range.
|
Argument |
Settings |
|---|---|
|
|
The cells to be filled, including the source range. |
|
|
The default value is |
If the value of cell A1 is 1, the following code automatically fills in the remaining cells in the range A1:A5 with the values 2 through 5:
Dim srcRange As Range
Dim destRange As Range
Set srcRange = ActiveSheet.Range("A1")
Set destRange = ActiveSheet.Range("A1:A5")
srcRange.AutoFill destRange, xlFillSeriesBecome an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access