Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
fverlaine
 
Posts: n/a
Default Named ranges in macros?


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

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Named ranges in macros?

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
  #3   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default Named ranges in macros?

Range("Test").select

--
Kind regards,

Niek Otten

"fverlaine" wrote
in message ...

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



  #4   Report Post  
Posted to microsoft.public.excel.misc
fverlaine
 
Posts: n/a
Default Named ranges in macros?


Thanks thats great :)


--
fverlaine
------------------------------------------------------------------------
fverlaine's Profile: http://www.excelforum.com/member.php...o&userid=29637
View this thread: http://www.excelforum.com/showthread...hreadid=493469

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Named ranges: don't want absolute references sonicblue Excel Discussion (Misc queries) 0 November 22nd 05 02:05 PM
Named ranges: don't want absolute references sonicblue Excel Discussion (Misc queries) 0 November 22nd 05 02:05 PM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Macro (Print) - Calling Named Ranges KGlennC Excel Discussion (Misc queries) 1 March 19th 05 09:20 PM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


All times are GMT +1. The time now is 01:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"