abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- Windows
hello
i have this code works well i try to adjust for filtering data by textbox instead of cells value and i would to filter data and paste to another sheet if i choose a new data copy and paste under old data in the other sheet but if i repeat filtering data are already existed in the other sheet then ignore them just copy and paste a new data
thanks advance
i have this code works well i try to adjust for filtering data by textbox instead of cells value and i would to filter data and paste to another sheet if i choose a new data copy and paste under old data in the other sheet but if i repeat filtering data are already existed in the other sheet then ignore them just copy and paste a new data
VBA Code:
Sub nn()
Dim StartDate As Date
Dim EndDate As Date
StartDate = Range("j2").Value
EndDate = Range("h2").Value
'StartDate = TextBox1.Value
'EndDate = TextBox2.Value
ActiveSheet.Range("A3:e3").AutoFilter field:=1, Criteria1:=">=" & CDbl(StartDate), Operator:=xlAnd, Criteria2:="<=" & CDbl(EndDate)
AutoFilterMode = False
End Sub
thanks advance