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?

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.