Jim
Is it that you have some set pattern of cells referenced to some one
cell? And that one cell can change to another cell and then you want to
repeat the macro to work on the same pattern but referenced to this other
cell? Is that what you want to do?
It appears that you recorded this macro with absolute references, and
from what you say you need to record the macro in relative reference.
Also, the macro recorder unfortunately records exactly what you do.
This produces a macro that works but the macro is very awkward. Let me give
you some alternate ways of writing the code you want.
Let's take the two lines:
Range("G29").Select
ActiveCell.FormulaR1C1 = "C-1"
What you want to happen is that "C-1" gets put into cell G29. Here are two
ways of doing the same thing:
Range("G29") = "C-1"
Or
[G29] = "C-1"
Notice that cell G29 is never selected. In VBA you don't have to select a
cell to do something with it. When you do it manually you do have to select
it. And that's what you did and that's what the macro recorder recorded.
The macro recorder recorded some 40 lines of code. You can do the same
thing in 20 lines.
Now if you have some pattern of cells with one reference cell, say G29,
then you can write the code like this:
[G29].Offset(2,0) = "HEALTHLINK"
The "[G29].Offset(2,0)" is cell G31.
"[G29].Offset(2,2)" is cell I31.
"[G29].Offset(-2,-2)" is cell E27.
What you say about the 11 plans, the drop-down list, and the five columns is
fairly easy to do. I would need to see the 11 plans and how they relate to
each other (same pattern - different values?) to see if a single looping
macro referencing different value tables can be set up.
Is the pattern of cells the same for each plan?
If you wish, send me a file showing all 11 plans and the cell pattern and
values for each plan. Also tell me how the 5 columns play into this. Send
the file direct to me. Don't post a file attachment in these newsgroups.
Remove "hello" from my email address or it will go nowhere. HTH Otto