The XlAutoFillType constant values specify how Excel fills the range of cells for the Destination parameter. The following table describes the results of each of the xlAutoFillType constant values.
CONSTANT |
DESCRIPTION |
xlFillDays |
Increments the values by days. If only one date is specified, increments one day. If multiple dates are specified for the source, uses those dates to determine increment value. |
xlFillFormats |
Applies the formats of the source cells to the destination cells |
xlFillSeries |
Creates a series based upon contents of source range |
xlFillWeekdays |
Increments based on weekdays omitting dates that fall on Saturday or Sunday |
xlGrowthTrend |
Fills cells based on a growth trend |
xlFillCopy |
Copies formatting of source and increments based on source values |
xlFillDefault |
Default value. Excel determines fill type based upon values in source cells |
xlFillMonths |
Increments the month portion of the date |
xlFillValues |
Increments values based upon values in source cells |
xlFillYears |
Increments the year portion of the date |
xlLinearTrend |
Fills cells based on a linear trend |
Type
Destination:=Range("A1:A10"), replacing Range("A1:A10") with the range of cells to fill.
□ Type Type:=xlFillMonths, replacing xlFillMonths with the constant specifying the type of fill.
0 Switch to Excel and run the macro.
■ The specified cells are automatically filled.
Type
Destination:=Range("A1:A10"), replacing Range("A1:A10") with the range of cells to fill.
□ Type Type:=xlFillMonths, replacing xlFillMonths with the constant specifying the type of fill.
0 Switch to Excel and run the macro.
■ The specified cells are automatically filled.
Was this article helpful?
Post a comment