0

I am trying to create a macro in Excel.

I am trying to do a search on say summary. I have placed an * as the first character of the summary to put those at the top. After those are found, everything after the * needs to go in sort order by another field. For now, I have had to do a sort on summary first and then highlight everything below that and then do my second sort. Is there any way to change that macro using VB so that it can be programmed to "find" that last row of the first sort and then sort everything down below it using the second criteria?

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by sdvanstavern
0

Here is my code if anyone can help

Sub Sort()
'
' Sort Macro
' Macro sort for issuelist
'
' Keyboard Shortcut: Ctrl+s
'
Range("A1:F81").Select
Range("B2").Activate
Selection.Sort Key1:=Range("E2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Rows("7:82").Select
Selection.Sort Key1:=Range("A7"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.