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
[TABLE="width: 500"]
<tbody>[TR]
[TD]JOB ID[/TD]
[TD]Cust Name[/TD]
[TD]Qty[/TD]
[TD]Length[/TD]
[TD]TYPE[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]900[/TD]
[TD]Luke[/TD]
[TD]5[/TD]
[TD]3700[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
[TR]
[TD]900[/TD]
[TD]Luke[/TD]
[TD]8[/TD]
[TD]5200[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
[TR]
[TD]750[/TD]
[TD]Mary[/TD]
[TD]4[/TD]
[TD]2400[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
[TR]
[TD]750[/TD]
[TD]Mary[/TD]
[TD]4[/TD]
[TD]7200[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
[TR]
[TD]400[/TD]
[TD]John[/TD]
[TD]2[/TD]
[TD]5000[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 500"]
<tbody>[TR]
[TD]JOB ID[/TD]
[TD]Cust Name[/TD]
[TD]Qty[/TD]
[TD]Length[/TD]
[TD]TYPE[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]900[/TD]
[TD]Luke[/TD]
[TD]5[/TD]
[TD]3700[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
[TR]
[TD]900[/TD]
[TD]Luke[/TD]
[TD]8[/TD]
[TD]5200[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
[TR]
[TD]750[/TD]
[TD]Mary[/TD]
[TD]4[/TD]
[TD]2400[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
[TR]
[TD]750[/TD]
[TD]Mary[/TD]
[TD]4[/TD]
[TD]7200[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
[TR]
[TD]400[/TD]
[TD]John[/TD]
[TD]2[/TD]
[TD]5000[/TD]
[TD]C15015[/TD]
[TD]Job Scheduled[/TD]
[/TR]
</tbody>[/TABLE]
Last edited: