Sort using array - help required

Lukums

Board Regular
Joined
Nov 23, 2015
Messages
195
Hello,

Currently I'm copying group data range by JOB ID from Sheet1 to Sheet2. So table for example please see below:
Grouping JOB IDs then sending them to Sheet2. This works fine as a group at a time when requested.
Once the data has been sent to Sheet2 it needs to sort by LENGTH + JOB IDs (ex JOB ID: 900)

The issue is:

900 is grouped and sent, then the 750 is grouped and sent straight after - I have no idea how to break this down and sort by length per JOB ID as an overall filter will destroy the JOB by JOB scenario.

I'm currently using to group my data.

With Sheets("Sheet1").UsedRange
.AutoFilter
.AutoFilter Field:=23, Criteria1:="C15015"
.AutoFilter Field:=25, Criteria1:="JOB SCHEDULED"
.Offset(1).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).Copy OB.Sheets("Sheet2").Cells(erow, 1)
.AutoFilter
End With


JOB IDCust NameQtyLengthTYPEStatus
900Luke53700C15015Job Scheduled
900Luke85200C15015Job Scheduled
750Mary42400C15015Job Scheduled
750Mary47200C15015Job Scheduled
400John25000C15015Job Scheduled

<tbody>
</tbody>
 
Last edited:

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,621
Messages
6,120,563
Members
448,972
Latest member
Shantanu2024

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