ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   unhidden row only (https://www.excelbanter.com/excel-discussion-misc-queries/177498-unhidden-row-only.html)

Nahc

unhidden row only
 
May I know how to numbered unhidden rows only.

Tyro[_2_]

unhidden row only
 
You cannot renumber the rows. Excel maintains the row numbers. You may not
change them.

Tyro

"Nahc" wrote in message
...
May I know how to numbered unhidden rows only.




Nahc

unhidden row only
 
am not re-numbering/re-sequencing it. the full sheet (hide and unhide) will
not be numbered. it will only be numbered after hiding those unwanted rows.
but when i try to number/sequence it on the unhidden rows.....the numbers
will include those hidden too.

Please note I may need to retrieve some of the hidden row for later use
hence am not deleting but hiding it.


"Tyro" wrote:

You cannot renumber the rows. Excel maintains the row numbers. You may not
change them.

Tyro

"Nahc" wrote in message
...
May I know how to numbered unhidden rows only.





Tom Hutchins

unhidden row only
 
Try this macro. It inserts a new column A, then in that column numbers only
the visible rows.

Sub NumberVisibleRows()
Dim x As Long, Rng As Range
x = 0
'Insert a new column A on the active sheet.
Range("A1").Select
Selection.EntireColumn.Insert
'Select the new column A.
Columns("A:A").Select
'Walk down column A.
For Each Rng In Selection
'If row is not hidden, increment the
'counter and number the row.
If Rng.EntireRow.Hidden = False Then
x = x + 1
Rng.Value = x
End If
'Move to the next row.
Next Rng
End Sub

Hope this helps,

Hutch

"Nahc" wrote:

am not re-numbering/re-sequencing it. the full sheet (hide and unhide) will
not be numbered. it will only be numbered after hiding those unwanted rows.
but when i try to number/sequence it on the unhidden rows.....the numbers
will include those hidden too.

Please note I may need to retrieve some of the hidden row for later use
hence am not deleting but hiding it.


"Tyro" wrote:

You cannot renumber the rows. Excel maintains the row numbers. You may not
change them.

Tyro

"Nahc" wrote in message
...
May I know how to numbered unhidden rows only.






All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com