Spreadsheet Column Fill
See Also
This dialog can be used to automatically generate a pattern or sequence of numbers to fill within a column. Patterns can be generated by providing a starting and ending value along with an incremental value. Numbers can also be repeated within the pattern. By default the pattern starts in the first cell of a column and is repeated as necessary to fill the column. However, the starting and ending positions for the generated pattern can be specified using the relevant options.

The list at the top of the dialog contains a list of the columns within the current spreadsheet. Select the column name that is to be filled with the numerical sequence.

Starting Value

First value in the sequence.

Ending Value

Last value in the sequence. If this differs from the Starting Value by an exact number of Increments it will be included in the pattern, otherwise the pattern will terminate at the value less than the ending value (greater than in the case of a negative increment).

Increment

The increment used to form intermediate values in the sequence. A negative increment must be specified if the Starting Value is greater than the Ending Value.

Number of Repeats

Allows a pre-multiplier to be applied to the sequence, so that each element is repeated the specified number of times.

Copy Down existing values over missing

When selected, any missing values in a column will be replaced with the first non-missing value that can be found above it in the same column.

Ignore restrictions/filters

When selected, rows that have been restricted/filtered will be excluded from the cells filled. The sequence of values will be inserted into the cells, jumping over the filtered/restricted cells, so if units 2 and 5 are restricted you will get the sequence 1 * 2 3 * 4.

Fill Selected Rows only

This option is only available when there is a row selection active in the spreadsheet. The fill operation will then just apply to the selected rows, i.e. skipping the unselected rows. The numerical sequence applied to the selected cells will be contiguous. For example, if the fill sequence was 1,2,3,4 and rows 1,3,5,7 where selected, then rows 1,3,5,7 would be given the values 1,2,3,4 respectively and rows 2,4,6,8 would have their values unchanged.

Fill all columns in Selection

This option is only available when there is a column selection active in the spreadsheet, or row selection and the Fill Selected Rows only option has been selected. The fill operation will then be applied to all columns containing selected cells. This allows multiple columns to be filled in one operation.

Fill from Cell

TopStart filling from the first cell in the column.
CurrentStart filling from the cell specified in the Current cell to fill from option. By default this value is specified as the current cell. When selected, the option Current cell to fill from is enabled and the starting cell for the column to be filled can be specified in the space provided.

Fill to

BottomFill all the cells, recycling the list if needed.
End of listFill the cells until the list is exhausted and then stop.

Preview

This list illustrates the sequence of numbers that will be inserted within the column. For very long sequences, the list only displays the first 20 and last 20 items, separated by a '...' item.

OK

Use the specified sequence to fill the column and close the dialog.

Apply

Use the specified sequence to fill the column and leave the dialog open for another fill operation.

Cancel

Close the dialog without making any changes.

Example of a column fill

Three columns have been taken from a spreadsheet. The first two columns in the table below show an example of where there are no repeated values for the column Treat and all repeated values in the column Rep are missing. Using the column fill dialog with the Copy down existing values over missing selected the columns can be automatically filled as show in the last 3 columns of the table.

BeforeAfter filling columns
TreatRepYearTreatRepYear
A191A191
*90A190
*91A191
290A290
*91A291
B190B190
*91B191
290B290
*91B291
C190C190
*91C191
290C290
*91C291

See Also

How to automatically fill a column
Fill a Column using a List
Fill a Column with Dates or Times
Fill a Column by Groups
Spreadsheet Insert Menu
Spreadsheet Calculate Menu

The MVFILL procedure can be used to fill down missing values in the command language.