Hi, all
I have this code in which it will filter based on selection made from drop-down list in Cell K2. At which part I should alter to make the data be filtered by using two parameters instead of one, one from drop-down list in cell K2 and another one from cell M3?
Option Explicit
Sub DTE_()
Sheets("DTE").Range("A2:G200").ClearContents
Dim Shop As String
Application.ScreenUpdating = False
Shop = Sheets("DTE").Range("K2")
With Sheets("Sheet1")
With .Cells(1).CurrentRegion
.AutoFilter 1, Shop
.Offset(1, 0).SpecialCells(12).Copy Sheets("DTE").Range("A2")
End With
.AutoFilterMode = False
End With
Sheets("DTE").Range("A1:G200").Borders.LineStyle = xlContinuous
Sheets("DTE").Range("A1:G200").WrapText = True
Application.ScreenUpdating = True
End Sub
Hereby I attached an example of the Excel file. Thanks in advance for the help!
Bookmarks