Macro for Advanced Filter stops before end

cesardltr

New Member
Joined
Sep 26, 2014
Messages
7
Code:
Sub AdvFilter()'
' AdvFilter Macro
'
' Acceso directo: Ctrl+Mayús+F
'
    ActiveSheet.Unprotect
    Application.Goto Reference:="Home"
    Range("B4").Select
    Range("Sort").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
        Range("Crit"), Unique:=False
    Application.Goto Reference:="Home"
    Application.Goto Reference:="Next"
    ActiveSheet.Protect AllowFormattingCells:=True
End Sub

which works fine up to the filter, but doesnot do the Application.Goto Reference:="Home" and subsequent instructions.

¿What am I missing?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Thank you Venkat. Didn't work. Behavior is exactly the same: After running the macro the active cells becomes the first in the filter and then it stops.

Yes, HOME AND NEXT are named cells.

TRY THIS

Code:
application.Goto  RANGE("HOME")

I presume HOME is a range name
 
Upvote 0
not clear. are these ranges within (within) the filtered data.

anyhow post a small extract of data and also indicate output of the macro.
 
Upvote 0

Forum statistics

Threads
1,215,541
Messages
6,125,413
Members
449,223
Latest member
Narrian

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top