G
Guest
Objectives:
1. Go to job Name column and take the Jobs pre-fixed with either Client or
CMJ,
then insert the rows to a new Worksheet - "Client Marketing"
2. Go to job Name column and take the Jobs NOT pre-fixed with either Client
or CMJ,if FM No = 0 then insert the rows to a new Worksheet - "No FM No"
In my code I have Job Name Col as Col 2 but it does change, need the code to
adjust - many thanks for help
Sub jo()
Dim i As Variant
j = 1
For Each i In Worksheets("Jobs 0104").Cells(i, 2)
If Left(Cells(i, 2), 6) = "Client" Or Left(Cells(i, 2), 3) = "CMJ" Then
Cells(i, 2).EntireRow Insert
Destination = Worksheets("client marketing").Cells(j, 1)
If Left(Cells(i, 2), 6) <> "Client" Or Left(Cells(i, 2), 3) <> "CMJ" Then
If Cells(i, 8) = 0 Then
Cells(i, 8).Copy Destination = Worksheets("No FM No")
Next
Next
End Sub
1. Go to job Name column and take the Jobs pre-fixed with either Client or
CMJ,
then insert the rows to a new Worksheet - "Client Marketing"
2. Go to job Name column and take the Jobs NOT pre-fixed with either Client
or CMJ,if FM No = 0 then insert the rows to a new Worksheet - "No FM No"
In my code I have Job Name Col as Col 2 but it does change, need the code to
adjust - many thanks for help
Sub jo()
Dim i As Variant
j = 1
For Each i In Worksheets("Jobs 0104").Cells(i, 2)
If Left(Cells(i, 2), 6) = "Client" Or Left(Cells(i, 2), 3) = "CMJ" Then
Cells(i, 2).EntireRow Insert
Destination = Worksheets("client marketing").Cells(j, 1)
If Left(Cells(i, 2), 6) <> "Client" Or Left(Cells(i, 2), 3) <> "CMJ" Then
If Cells(i, 8) = 0 Then
Cells(i, 8).Copy Destination = Worksheets("No FM No")
Next
Next
End Sub