Hi,
I'm programming VBA behind Excel. I have an excelsheet with Data, which I would like to filter and have only the resulting data copied over to another worksheet. My Code currently reads as following:
Private Sub split_schleckerland()
With Worksheets("Stammdaten")
[Y3].AutoFilter Field:=25, Criteria1:="X"
[Z3].AutoFilter Field:=26, Criteria1:="X"
[AA3].AutoFilter Field:=27, Criteria1:="X"
[AB3].AutoFilter Field:=28, Criteria1:="X"
[AC3].AutoFilter Field:=29, Criteria1:="X"
[AD3].AutoFilter Field:=30, Criteria1:="X"
Cells.SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets("Schleckerland").[A1]
End With
End Sub
unfortunately, the resulting Data which is pasted is merely the whole data filtered. I want ONLY the filtered data without any filer settings as a resulting data. How do I accomplish this?
I'm programming VBA behind Excel. I have an excelsheet with Data, which I would like to filter and have only the resulting data copied over to another worksheet. My Code currently reads as following:
Private Sub split_schleckerland()
With Worksheets("Stammdaten")
[Y3].AutoFilter Field:=25, Criteria1:="X"
[Z3].AutoFilter Field:=26, Criteria1:="X"
[AA3].AutoFilter Field:=27, Criteria1:="X"
[AB3].AutoFilter Field:=28, Criteria1:="X"
[AC3].AutoFilter Field:=29, Criteria1:="X"
[AD3].AutoFilter Field:=30, Criteria1:="X"
Cells.SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets("Schleckerland").[A1]
End With
End Sub
unfortunately, the resulting Data which is pasted is merely the whole data filtered. I want ONLY the filtered data without any filer settings as a resulting data. How do I accomplish this?