Dynamic Selecting Cell in Filtered Range in VBA

  • Hi, I am trying to create a dynamic cell selection to perform calculations in filtered range. My current code is following:


    Code
    ActiveSheet.Range("$A$1:$AJ$1").AutoFilter Field:=13, Criteria1:= _
            "Sales Invoices"
        Range("Y5991").Select
        ActiveWindow.SmallScroll Down:=-6
        Range("Y5991").Select
        ActiveCell.FormulaR1C1 = "=RIGHT(LEFT(RC[9],FIND(""ns#: "",RC[9],1)+10),6)"
        Range("Y5991").Select
        Selection.FillDown


    Currently, I have the first selected cell Y5991 as my first result in the filtered range. I would like to replace it as a dynamic coding.


    Thanks!!


    Wayne

  • Re: Dynamic Selecting Cell in Filtered Range in VBA


    Hi Wayne,


    Welcome to Ozgrid!!


    Is this what you're after:



    Robert

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!