View Single Post
 
Old 07-15-2022, 02:58 AM
Ongbey Ongbey is offline Windows 10 Office 2013
Novice
 
Join Date: Jul 2022
Posts: 3
Ongbey is on a distinguished road
Default

Thank you !

I have last question;

I will use this code for 8 column (A1:H1)
And I will filter the table according to column 5.

Which correction will be done? Is it enough to correct as follows:

Set myrng = ActiveSheet.AutoFilter.Range.Columns(2) -> Columns(5)
If mydic.Count > 0 Then ActiveSheet.AutoFilter.Range.AutoFilter Field:=2 -> Field:=5
If myAutoF Is Nothing Then Range("A1:B1").AutoFilter -> Range("A1:H1")

I made this change, but code did not run.
Reply With Quote