Thread
:
Numbering a Range Using Autofilter
View Single Post
#
2
Posted to microsoft.public.excel.misc
Don Guillett
Posts: n/a
Numbering a Range Using Autofilter
One way. This will re-number the visible cells in col A
Sub numbervisible()
lr = Cells(Rows.Count, 1).End(xlUp).Row
Set myrng = Range("a2:a" & lr).SpecialCells(xlCellTypeVisible)
counter = 1
For Each c In myrng
c.Value = counter
counter = counter + 1
Next c
End Sub
--
Don Guillett
SalesAid Software
"tanya" wrote in message
...
This is driving me crazy! I have autofiltered a range, but want to be
able
to number that range from 1 to xxx each time I apply a different filter.
But
even though I have only set the auto filter up on the specific columns it
hides the whole row that is being filtered. I have tried converting the
range to a list that also does not work, and nor does using the ROW
function.
Any ideas?
Reply With Quote