Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generate a value in a column starting a predefined value.

Status
Not open for further replies.

EM1107

IS-IT--Management
Apr 24, 2002
153
CA
Good day everyone. I am new in MS Excel and I would like to know how I can set a value in a column and increase that value for the next 100 rows in that column.

For instance, I would like the column A1 to start at 100 and then get all the other rows in that column from A2 to A100 to have the value 101 to 200. How can I generate that number automatically.
 
On the Edit menu.

Edit | Fill | Series...

At least that's where it is in 2003 version. It might have moved on later versions.
 
... or put formulas in the cells A2:A100 like:

=A1+1

( in cell A2, copied down )

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 
That would be fine as long as I do not delete the old column
 
I forgot to mention I am using Office 2010.
 
If you put any value in a cell, and click and drag the box at the bottom right corner, it will fill the cells you drag over and increment by 1. If you have a different pattern, such as 2,4,6: select the three cells, and drag that box. it will increment by 2.

Sadly this is pretty much the only pattern Excel recognizes. If there is a different pattern, it gets goofy.
Example:

[tt]
A B C D E F
1| 1 2 4

A B C D E F
1| 1 2 4 [red]5.3 6.8 8.3[/red]
[/tt]

 
Thanks for the information.
 
It does what it is suppose to do but it is not working as I would like it to work so I found an other method using SQL Server.

The aim was to extract data from SQL Server and add the data to a ascii delimited file and then use MS Excel to change the value before importing that into an other database using an import utility.
 

If you put values in two cells, then click the first cell then Shift Click the second cell then drag the box at the bottom right corner, it will fill the cells you drag over and increment by the difference between the two

Try A1=1 B1=3 and do the above yields 1 3 5 7 9 ....

Likewise
A1=0 B1=5 yields 0 5 10 15 20 25 ....

Sam

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top