Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I view excel rows in name order infirst column?
I want to view name labels in alphabetical order in that I label in the first
column. How can I adjust the column after I add new names? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I view excel rows in name order infirst column?
Buglebeek1 wrote...
I want to view name labels in alphabetical order in that I label in the first column. How can I adjust the column after I add new names? You'd need to sort the entire table. You could use an event handler macro, specifically, a Change event handler, to sort the table upon any entry in the first column. For example, with the table range identified by the sheet-level defined name tbl, and assuming tbl contains headers in its first row, Private Sub Worksheet_Change(ByVal Target As Range) 'put table range's name here - change as needed Const NMDRNG As String = "tbl" Dim t As Range, n As Long Set t = Names(NMDRNG).RefersToRange n = t.Columns.Count Set t = t.Resize(t.End(xlDown).Row - t.Row, 1).Offset(1, 0) 'exit quickly if no change in 1st col of named range If Intersect(Target, t) Is Nothing Then Exit Sub On Error GoTo CleanUp Application.EnableEvents = False t.Resize(, n).Sort _ key1:=t.Cells(1, 1), _ Order1:=xlAscending, _ Header:=xlNo CleanUp: Application.EnableEvents = True End Sub |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
how do I view excel rows in name order infirst column?
Select column A and DataSortAscending
Gord Dibben MS Excel MVP On Fri, 16 Nov 2007 10:50:03 -0800, Buglebeek1 wrote: I want to view name labels in alphabetical order in that I label in the first column. How can I adjust the column after I add new names? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I view the maximum rows in Excel 2007 (Million Rows)? | Excel Discussion (Misc queries) | |||
column is hidden in normal view but not print view | Excel Worksheet Functions | |||
Can I view 2 rows of tabs in Excel? | Excel Discussion (Misc queries) | |||
moving alternating rows to a column with the order staying the sam | Excel Discussion (Misc queries) | |||
moving alternating rows to a column with the order staying the sam | Excel Discussion (Misc queries) |