Set a Rng for Sorting based on cell value

  • Hello,


    I am attempting to create a macro based on the example data shown below.


    What I would like to do is set a parameter "rng" to be equal to the range shown in cell C3.


    Then I would like to sort the Fruit by year, and delete the 2021 fruit.


    My issue isnt really with the sorting and deleting, but it is really with setting the range from the cell range shown in cell C3. I dont want to sort the vegetables.


    I am wondering how I can get the Set parameter to make the range equal to what is in the cell C3.


    Any ideas?


Participate now!

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