Aug 22 2024 08:25 AM
Sub santo()
Set ws = Worksheets("Filter")
LastRow = Cells.Find("*", , xlValues, , xlRows, xlPrevious).Row
For i = 1 To 15
a = Array(ws.Range(a(i) & "1").Value, ws.Range(a(i) & "2").Value, ws.Range(a(i) & "3").Value, ws.Range(a(i) & "4").Value)
Sheets.Add.Name = a(0)
With Worksheets("Sales Data").Range("A1" & LastRow)
.AutoFilter Field:=4, Criteria1:=Array(a(1), a(2), a(3)), Operator:=xlFilterValues
.SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets(a(0)).Range("A1")
End With
Next
End Sub
Aug 22 2024 10:39 AM
Hello! You've posted your question in the Tech Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Excel space - please post Excel questions here in the future. (You can find this and other product discussion spaces in the future through the Community Hubs page.)