AutoFill a series to last row in dataset

C

coastal

Is there a way to do the following:

Fill a column with a text "Sales" for all rows until the last row of the
data set without having to drag the first cell all the way down?

Fill a column with a seriers "1, 2, 3" for all rows until the last row of
the data set without having to drag the first cell all the way down?
 
D

Dave Peterson

You can select the range first.

Say you want to fill A1:A10 (making it easy):
Edit|goto and type in A1:A10
and hit enter.
A1:A10 will be selected
type Sales
and hit ctrl-enter to fill all the cells in that selection.

You can select B1:B10 the same way and then
type in:
=row()
and hit ctrl-enter

If your range doesn't start in row 1, you can adjust the formula. Say you want
A4:A999 filled with 1, 2, ..., 996.

Select A4:A999
but fill it with
=row()-3
(and still hit ctrl-enter)
 
G

Gord Dibben

One more method.

If you have data in an adjacent column just enter Sales in top cell then
double-click on the fill handle to copy down.

Same for the numbers.

Enter a 1 in top cell, a 2 in cell below.

Select both cells and double-click on the fill handle to copy down.


Gord Dibben MS Excel MVP
 
Top