Claire_Brummell
Board Regular
- Joined
- Sep 29, 2004
- Messages
- 129
Hey, just need to tweak this code:
Basically I have a merged cell at the top of the page which is the page header.
I then have a row of cells which are my column headers.
I want this code to sort the info in the table (by column A) without including the page or column headers.
I know it must be nearly there but it's just not quite right yet as it's still sorting the column headers too
Any help would be appreciated.
Thanks x
Code:
' Sorts worksheets
For Worksheet_Counter = 2 To ActiveWorkbook.Sheets.Count - 1
'MsgBox ("Sorting Sheet - " & Sheets(Worksheet_Counter).Name)
If Worksheets(Worksheet_Counter).Range("A3") <> "" Then
Worksheets(Worksheet_Counter).Range("A3").Sort _
Key1:=Worksheets(Worksheet_Counter).Columns("A"), _
Order1:=xlAscending, _
Header:=xlYes
End If
Next Worksheet_Counter
Basically I have a merged cell at the top of the page which is the page header.
I then have a row of cells which are my column headers.
I want this code to sort the info in the table (by column A) without including the page or column headers.
I know it must be nearly there but it's just not quite right yet as it's still sorting the column headers too
Any help would be appreciated.
Thanks x