Hello,
I am trying to use a select case within another select case, to evaluate two different criteria ranges, but the second one doesn't seem to be working. Can anyone see why this might be?
Thanks
Rich
Sub GULF()
Sheets.Add.Name = "Gulf Debtors"
'copy header row
With Sheets("ORIGINAL DEBTORS")
.Activate
.Range("A1:CD1").Copy Destination:=Sheets("Gulf Debtors").Range("A1")
n = 2
For m = 2 To 30649
Select Case .Cells(m, 15).Value
Case "GC08", "GD22", "GD23", "GD24", "GD25"
.Range(.Cells(m, 1), .Cells(m, 82)).Copy Destination:=Sheets("Gulf Debtors").Cells(n, 1)
Case Else
Select Case .Cells(m, 23).Value
Case "C001", "C003", "C018", "C061", "C077", "C109", "C176", "C177", "C189", "C228", "G128"
.Range(.Cells(m, 1), .Cells(m, 82)).Copy Destination:=Sheets("Gulf Debtors").Cells(n, 1)
n = n + 1
End Select
End Select
Next m
End With
End Sub
Bookmarks