Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks for the feedback.
Gord On Wed, 18 Apr 2007 11:34:02 -0700, Teddy-B wrote: Gord: I liked your macro best of all. It is simple and effective. "Gord Dibben" wrote: Teddy You have other responses for coloring. If you want to sort and categorize with a break point letter try this macro. Sub Alphabet_Sort() Dim iRow As Long Dim FirstRow As Long Dim LastRow As Long Columns("A:A").Select Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal FirstRow = 2 LastRow = Cells(Rows.Count, "a").End(xlUp).Row For iRow = LastRow To FirstRow Step -1 If Left(Cells(iRow, "a").Value, 1) < _ Left(Cells(iRow - 1, "a").Value, 1) Then Rows(iRow).Insert With Cells(iRow, "a") .Value = Left(Cells(iRow + 1, "a").Value, 1) .Font.Bold = True .HorizontalAlignment = xlCenterAcrossSelection .Font.Underline = xlUnderlineStyleSingle End With End If Next End Sub Gord Dibben MS Excel MVP On Wed, 18 Apr 2007 08:32:07 -0700, Teddy-B wrote: is there a way to insert a break bar or something between the lists of names at each new last name beginning letter? My list is extensive and I audit by name (alphabetically) - To show the break points between the names would be very helpful. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Referencing to cells in a sorted list | Excel Discussion (Misc queries) | |||
Sorted list | Excel Discussion (Misc queries) | |||
how to count records in a sorted list | Excel Worksheet Functions | |||
Need sorted validation list | Excel Worksheet Functions | |||
alphabetical list | New Users to Excel |