![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 1
|
Q: I have a request from management to do this - and am stuck. How do you auto number in excel. Straight down the column at the beginning without using the page setup/ sheets/ print columns and rows headings, because the column headings are still there and when you filter the numbers are still not right. Here is the kicker, I was it to reassign numbers every time that I filter out some things. Is this possible at all?
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: May 2002
Location: Gothenburg, Sweden
Posts: 74
|
It is possible, but not particularly easy.
If you make a VBA Macro you can select the visible cells - the ones not hidden by the filter. If you want the A column to have these number you might try something like: Dim i As Integer, rng As Range i=0 For Each rng in Columns(1).SpecialCells(xlCellTypeVisible) rng.Value=i i=i+1 Next Note that you have to update this at some smart events.
__________________
/Niklas Jansson |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|