Hi All,
I created a spread sheet which I use as a form. It has 500 rows
starting at row 10.
I named these 500 rows, "COST" I don't always want 500 rows.
I will deleate rows from the middle to suite my needs.
I then created a macro to print this sheet using "COST" as my print
range.
The macro did not retain the name, "COST", but replaced it with cell
references. If I reduce the sheet to 150 rows, it will still print 500
rows. I therefore have to edit the macro to suite the number of rows.
How can I have a named range in the macro which will retain the name
and expand or contract with the addition or removal of rows?
Thanks very much for your help.
Tom
Gord Dibben - 08 Jun 2007 22:03 GMT
Debra Dalgleish explains how to build a Dynamic Range and name it.
http://www.contextures.on.ca/xlNames01.html#Dynamic
Gord Dibben MS Excel MVP
>Hi All,
>
[quoted text clipped - 16 lines]
>
>Tom