Need to just tweak this code for sorting a section...

Claire_Brummell

Board Regular
Joined
Sep 29, 2004
Messages
129
Hey, just need to tweak this code:

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
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,214,534
Messages
6,120,080
Members
448,943
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top