Control + q to run the macro in the attached file.
Sub msb()
Dim myCurrency As String
Dim myDate As String, ws2 As Worksheet
Set ws2 = Worksheets("Sheet2")
myCurrency = Application.InputBox("Enter the currency type.", Type:=2)
myDate = Format(Application.InputBox("Enter a date.", Type:=2), "dd-mmm-yy")
Application.ScreenUpdating = False
Worksheets("Sheet1").AutoFilterMode = False
With Worksheets("Sheet1").Cells(1).CurrentRegion
.AutoFilter 9, "Executed"
.AutoFilter 8, myCurrency
.AutoFilter 7, myDate
.Columns("D:E").Hidden = True
.Columns("G:I").Hidden = True
.Offset(1).Copy ws2.Range("A" & ws2.Range("A" & Rows.Count).End(xlUp).Row + 1)
.Columns("A:I").Hidden = False
.AutoFilter
End With
Application.ScreenUpdating = True
End Sub
Bookmarks