The Gnumeric Manual
Prev |  | Next

# Chapter 8. Autofill

# 8.1. Autofill Introduction

Often times, a set of sequential or ordered numbers needs to be written. While simple, it is a tedious task to complete. Gnumeric allows for a pattern to be set with items that can be ordered and have the rest of your sorting done automatically.

A good example of such a use would be if you wanted to setup a list of the months or television station numbers.

## 8.1.1. My First Autofill

For being such a timesaver, autofilling in Gnumeric is actually quite simple. To do an autofill:

1. Enter a number into the first cell you wish to autofill.

2. Enter a value into the second cell you wish to autofill. This must be adjacent to the first cell. This sets the increment to use when autofilling the rest of your cells.

3. Select the cells you just entered. At the bottom-right of the selection should be a small box. Your mouse cursor will change to a cross-hair when placed over the box. Press and hold on the box. Drag in the direction you wish to increment. You can also autofill using the menus. Make your selection and use: Edit->Fill->Autofill

4. Release the button. The selection you created with the small box should now be filled with numbers based on the increment you set in the first two boxes.

| Autofilling Months

Gnumeric is able to complete month names for you. Just type your starting month in a cell, the second month in the second cell, and drag like you would if you were doing numbers. Gnumeric will also increment:

Simple Values

  1, 2, 3, etc.

Weekday

  Monday, Tuesday, etc.

Short Weekdays

  Mon, Tues, etc.

Months

  January, February, etc.

Short Months

  Jan, Feb, etc.

Strings with Numbers

  Item1, Item2, etc

Date Strings

  11/14/2001, 11/15/2001, etc.

  Gnumeric supports incrementing the date by month, date, or year.

  Note that, While Gnumeric will increment days of the month, if you do 11/14/2001 and 12/14/2001, it will recognize it as the same day of the month and increment to 1/14/2002 instead of the day difference.

## 8.1.2. Using Adjacent Columns for Autofill Length

Gnumeric is able to not only autofill based on the selection you make, but autofill to the length of an adjacent column.

Example 8-1. Adjacent Columns for Autofill Length Example

You enter A1:A10 with random information. In B1,B2 you enter 1 and 2 respectfully. Column B will increment through B10, based on the length of A. The increment used is normally generated by the difference between B1 and B2.

To use an adjacent column for length control:

1. Fill a column or row with information.

2. Enter information into a column or row to either the right or bottom of the previous information.

3. Select the column or row you wish to autofill.

4. Double-click the small box at the bottom-right to increment by column, with the length controlled by the adjacent column. Double-click while holding Alt to set the size to the above row.

Prev | Home | Next
Cut, Copy and Paste |  | Cell Formatting