Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Automatically Select//Print A Sort Range

0

Good Morning!!

Is anyone aware of a function, vba code, etc that will enable me to automatically//dynamically select a range of cells in a macro, prior to sorting & printing?

I'm trying to create a macro which will select, sort and print a range of cells in multiple sequences.

This would entail some variation of finding the first and last cells in a range, and activating this range, printing a report, re-selecting the range, re-sorting & re-printing, etc.

Does this make sense --  Sorry for the confusion . . .

Thanks,

Greg

Answer
Discuss

Discussion

The task as such isn't difficult, nor is it unique. But it must be adapted to your workflow and without precise knowledge of your workflow literally nothing can be done. Please consider: How can a macro select a range? Either the range is predetermined, like columns A:C and F:G, from row 2 to end. Or it must be shown, like, everything I selected or 3 columns to the right and down of the seelcted cell. Best way to proceed, since you are "trying to create a macro", post your workbook with your attempted macro inside, and re-formulate your question around your experience with trying to create. And, yes, you are right in splitting your question between "select, sort and print". The entire project is far too voluminous for one thread here.
Variatus (rep: 4889) Mar 17, '20 at 8:29 pm
Add to Discussion



Answer the Question

You must create an account to use the forum. Create an Account or Login