Hi Guys
Wow, they work like magic. Thanks Ashish and Rajan.
Some more new knowlege for me.
Great work and thanks
Charlie Harris
On Aug 26, 5:58 pm, "Rajan_Verma" wrote:
> Try this:
>
> Sub SortList()
>
> On Error Resume Next
>
> Dim Record As Integer
>
> Record = ActiveSheet.UsedRa
Try this:
Sub SortList()
On Error Resume Next
Dim Record As Integer
Record = ActiveSheet.UsedRange.Rows.Count
For i = 1 To Record
If Range("D" & i).Value = "HD" Then
Range("D" & i + 1).Select
ActiveCell.Resize(ActiveCell.End(x
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