1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Sub macro()
For w = 1 To 4
If w > 1 Then
Range("K4").Value = "Product/Period"
Range("K5").Value = "=CONCATENATE(LEFT(cells(26024+w-1,1),2+2*w-2),""?? *"")"
Range("A3:I26014").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
Range("K4:K5"), Unique:=False
Range("K4").Value = ""
Range("K5").Value = ""
Cells(26025 + w - 1, 1).CurrentRegion.Select
selection.Offset(1 + w - 1, 0).Resize(selection.Rows.Count - 1 - w + 1, selection.Columns.Count).Select
selection.Clear
End If
end sub |
Partager