see if it helps

Sub SORT_DA()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Dim lA, I  As Long
Dim a As Range
    Set a = Range("D1")

        For lA = 1 To WorksheetFunction.CountIf(Columns(4), "HD")
            Set a = Columns(4).Find(What:="HD", After:=a, LookIn:=xlValues,
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False)
                      If Not a Is Nothing Then

Sheets(1).Range("D" & a.Row & ":f" & Range("D" &
a.Row).End(xlDown).Row).SORT key1:=Sheets(1).Range("F" & a.Row),
order1:=xlAscending, Header:=xlYes
End If

        Next lA
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub




On Fri, Aug 26, 2011 at 6:40 AM, Cab Boose <swch...@gmail.com> wrote:

> Hi
>
> On attached   workbook there is a sheet tha has multiple lists with empty
> rows in between.  No of empty rows can vary.
>
> What I am trying to do is sort each list on the list into say into col F
> ascending order.  Once the first list sorted vba takes it onto the next
> list, until all lists have been sorted.  The empty rows still remain.
>
>
> Each list is always started with a heading row which with a ' HD' ref in
> the same row D.  Is this the best reference for finding each list.
>
> In plain English
>
> go to first entry of    HD
> xldown to last entry in that list
> data sort by col F
>  next list
>
> Your help would be appreciated.
>
> Thanks
>
> Charlie Harris
>
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>



-- 
*Regards*
* *
*Ashish Koul*
*akoul*.*blogspot*.com <http://akoul.blogspot.com/>
http://akoul.posterous.com/
*akoul*.wordpress.com <http://akoul.wordpress.com/>
My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830>


P Before printing, think about the environment.

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to