I'm trying to filter data in Sheet1 with values in Sheet2 when clicking a button, I've tried looking for a macro that am getting an error "AutoFilter method of Range class failed"
Please Login or Register to view this content.
I'm trying to filter data in Sheet1 with values in Sheet2 when clicking a button, I've tried looking for a macro that am getting an error "AutoFilter method of Range class failed"
Please Login or Register to view this content.
Try this one
Please Login or Register to view this content.
Same error, the following line is highlighted in the debugger
error2.png
Because you are Filtering Selection. , Pl chech up Selection range.Cursor should be in Database range.
Thank you for your reply however I am new to VB and do not understand your answer
Allan,
I think it would be much easier if you could attach your sample, so that we can see and test where the error is.
While running the macro the curser in worksheet should be within database range.
Eg: Filter range is A1:E25 cursor may be in D13.
The was the problem, simple things! I'm trying to then export the newly filtered data to a graph in a new sheet, can it be done on the same macro?
Also, is there any way to select more than 1 column filter? i.e. the below code is taking a year value from F17, such as 2006, can it take additional inputs to filter by say 2006, 2007, 2008?
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks