Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I view the maximum rows in Excel 2007 (Million Rows)? shanth Excel Discussion (Misc queries) 2 January 15th 07 05:45 PM
column is hidden in normal view but not print view Bianca Excel Worksheet Functions 2 June 23rd 06 08:38 AM
Can I view 2 rows of tabs in Excel? Elseygirl Excel Discussion (Misc queries) 2 April 5th 06 07:58 PM
moving alternating rows to a column with the order staying the sam ad Excel Discussion (Misc queries) 3 April 28th 05 09:49 PM
moving alternating rows to a column with the order staying the sam Duke Carey Excel Discussion (Misc queries) 0 April 27th 05 09:51 PM


All times are GMT +1. The time now is 04:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"