How do I write a macro refering to a named range in the sheet rather than the range itself. Ie. I have named cells A1 to F7 as "test". When writing a macro I want to refer to "test" rather than Range("A1:A7").select?
How do I write a macro refering to a named range in the sheet rather than the range itself. Ie. I have named cells A1 to F7 as "test". When writing a macro I want to refer to "test" rather than Range("A1:A7").select?
worksheets("sheet1").range("Test").clearcontents
Most times, you don't have to select a range to work on it.
fverlaine wrote:
>
> How do I write a macro refering to a named range in the sheet rather
> than the range itself. Ie. I have named cells A1 to F7 as "test". When
> writing a macro I want to refer to "test" rather than
> Range("A1:A7").select?
>
> --
> fverlaine
> ------------------------------------------------------------------------
> fverlaine's Profile: http://www.excelforum.com/member.php...o&userid=29637
> View this thread: http://www.excelforum.com/showthread...hreadid=493469
--
Dave Peterson
Range("Test").select
--
Kind regards,
Niek Otten
"fverlaine" <fverlaine.201hly_1134579601.0514@excelforum-nospam.com> wrote
in message news:fverlaine.201hly_1134579601.0514@excelforum-nospam.com...
>
> How do I write a macro refering to a named range in the sheet rather
> than the range itself. Ie. I have named cells A1 to F7 as "test". When
> writing a macro I want to refer to "test" rather than
> Range("A1:A7").select?
>
>
> --
> fverlaine
> ------------------------------------------------------------------------
> fverlaine's Profile:
> http://www.excelforum.com/member.php...o&userid=29637
> View this thread: http://www.excelforum.com/showthread...hreadid=493469
>
Thanks thats great![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks