Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I found the following via Google -- Sub SortColumn(strSheetName As String, strColumnLetter As String) Dim strColumnRange As String Dim rngCurrentCell As Range Dim rngNextCell As Range strColumnRange = strColumnLetter & "1" Worksheets(strSheetName).Range(strColumnRange).Sor t _ Key1:=Worksheets(strSheetName).Range(strColumnRang e) Set rngCurrentCell = Worksheets(strSheetName).Range(strColumnRange) End Sub -- This sorts a column perfectly. But the problem is, I need to sort cells which contain first a word then a number. This only sorts the word. If I change that to two coluimns, can the above Sort routine be changed so it sorts both? Thanks - Kirk |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting Values Without Sorting Formulas | Excel Discussion (Misc queries) | |||
Automatic sorting (giving max and min) based on custom sorting lis | Excel Worksheet Functions | |||
Sorting VLookup vs Sorting SumProduct | Excel Discussion (Misc queries) | |||
Sorting: Sorting by the First Character | Excel Discussion (Misc queries) | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |