Thread: Numbering Problem (Excel 2000)

1. Numbering Problem (Excel 2000)

Hallo

I have a workbook with hundreds of pages. Items on each page is numbered A, B, C ......., etc, then on the next page the same starting all over at A, B etc etc.

I have added a column to the left called New Number. I colour coded this column yellow.
What I am trying to do is re-number the items from 1, 2 ,3 etc to the last item. I do not want the numbering to start new on every page.

I was trying to record a macro that can start at item 1 in the yellow column, then go one column to the right, use END down to find the next item, then to one left into the yellow column, then add 1 to the previous number. Sadly all my efforts fail.

I was wondering if somebody got code to do this or if somebody can point me in the right direction as to how to do this.

I attach a small extraction from the workbook as a Sample.

Thank you in advance

2. Re: Numbering Problem (Excel 2000)

Try this:

Dim lngRow As Long
Dim lngMaxRow As Long
Dim lngNum As Long
lngMaxRow = Range("B65536").End(xlUp).Row
For lngRow = 3 To lngMaxRow
If Not Range("B" & lngRow) = "" Then
lngNum = lngNum + 1
Range("A" & lngRow) = lngNum
End If
Next lngRow
End Sub

3. Re: Numbering Problem (Excel 2000)

Hans

What can I say but, BRILLIANT

It works perfectly, thank you very, very much.

You just solve a problem in about 2 minutes, where I struggled for hours without succes.

Hans I really appreciate it

Regards

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•