Use Named Range instead?

D

David

The loop I want wouldn't cycle through the whole list (all the patients
enrolled in our program) in AC, but only the names I select (my caseload)
from AC and apply a range name (myList) to. For each name in my caseload
(myList), PrintMine() would find only those names in A and print the
pages for only those patients.

Example:
ColAC
Name1 through Name100 (names only, no blanks, sorted alphabetically)
I select Name3, Name7, Name8, Name15, and Name21 (the discontiguous
range--my caseload) and apply a range name (myList) to that selection

ColA
Name1 followed by a list of classes
Name2 followed by a list of classes
Name3 followed by a list of classes
and so on through Name100

Each patient's page is set via horizontal page breaks

PrintMine() would loop through myList, finding each of those patients in
ColA and printing that patient's page.


Sorry this has been such a confusing exercise. I know you can't see my
screen.
 
D

Dave Peterson

Is there anything on that row that indicates that the name in column AC should
be used?

You could check for that indicator, too.

If only you (as a human) know what's in that list, maybe you could use another
workbook to create the list and cycle though that. It might be easier than
fiddling with a range name that changes.
 
D

David

Dave Peterson wrote
Is there anything on that row that indicates that the name in column
AC should be used?
Nope

If only you (as a human) know what's in that list, maybe you could use
another workbook to create the list and cycle though that. It might
be easier than fiddling with a range name that changes.

I think I'd rather opt to copy my caseload names from AC to another column,
Hide it, Name and cycle through that range. I could add/remove names
to/from that list manually
 
D

Dave Peterson

I'd even put it on another worksheet--then inserting/deleting rows would be
safer.

But if you don't have enough control over that workbook, you can still have your
macro use a completely different workbook, too.
 
D

David

I just realized adding/removing classes would indeed disturb my list.
Thanks for making me think.

I really appreciate all the time and effort you've expended on my behalf.
 
D

Dave Peterson

Good luck on the project.
I just realized adding/removing classes would indeed disturb my list.
Thanks for making me think.

I really appreciate all the time and effort you've expended on my behalf.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top