Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Row Numbering question

Status
Not open for further replies.

Golestan

Mechanical
Nov 27, 2006
110
0
0
US
Hi,
I need to number my data set rows in a worksheet. But the rows are every other one. (one empty row between each data row) Is there an way to do this simply?

Thanks
 
Replies continue below

Recommended for you

Excel is pretty good at pattern matching using the AutoFill function. Just number the first three data rows manually, select the first 6 cells (the 3 that you numbered and the empty cells below each of them), click that little black square at the bottom right hand corner of the selection, and drag down as far as you want.
 
One of the ways to accomplish it: suppose the row numbering starts at cell A5 with number 1. Copy the following formula in the column below A5
Code:
=IF(ROW()=ODD(ROW()),A5+1,"")
Should do!
 
This counting formula will skip blank rows. Say the numbering is in column A and the list items are in column B. Put this formula in cell A1 and fill down...

Code:
=IF(ISBLANK(B1)=TRUE,"",COUNTA($B$1:B1))
 
Hi Golestan:

A simple way to do this is to use EXCEL's Fill_Series feature. Let us say your data begins in row 2, aand you want row numbers in column C, then this is what you do ...

1) key in 1 in cell C2
2) key in 2 in cell C4
3) select cells in column C starting with cell C1 and going down as many rows as you like.
4) With all the cells selected, and with cell C1 as the ActiveCell, invoke EDIT|Fill>Series, then ...
5) Series in Box ... click in option button Column
6) Type Box ... click in option button AutoFill
7) click OK
8) if the rows are numbered the way you want ... Success! otherwise undo and back to Step 1

I hope this helps.


Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
ANAND Enterprises LLC
 
Putting in alternating blank rows however would not allow you to conviniently copy formulas down through all the cells. Mabe all you need to do is increase the row hight and select cell alignment and select center horizontal and center vertical. The added row height with text in the middle would give the appearance of having blank row in between yet allow you to copy formulas down.
 
Status
Not open for further replies.
Back
Top