+ Reply to Thread
Results 1 to 4 of 4

Named ranges in macros?

Hybrid View

fverlaine Named ranges in macros? 12-14-2005, 12:57 PM
Guest Re: Named ranges in macros? 12-14-2005, 01:10 PM
Guest Re: Named ranges in macros? 12-14-2005, 01:10 PM
fverlaine Thanks thats great 12-14-2005, 01:34 PM
  1. #1
    Registered User
    Join Date
    12-14-2005
    Posts
    2

    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?

  2. #2
    Dave Peterson
    Guest

    Re: 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. #3
    Niek Otten
    Guest

    Re: Named ranges in macros?

    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
    >




  4. #4
    Registered User
    Join Date
    12-14-2005
    Posts
    2

    Smile Thanks thats great

    Thanks thats great

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1