+ Reply to Thread
Results 1 to 3 of 3

Named ranges and VBA

  1. #1
    Registered User
    Join Date
    10-11-2004
    Posts
    69

    Named ranges and VBA

    If I have a cell in my spreadsheet named PICKVALUE and I wish to reference it in a macro using the IF function (eg to get the macro to do something if the value of PICKVALUE is above 2000) can I use the name PICKVALUE without redefining it in VBA?

  2. #2
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    you can reference the named cell by using range("PICKVALUE")

    if(range("PICKVALUE").value>2000) then
    ' your code
    end if

  3. #3
    Registered User
    Join Date
    10-11-2004
    Posts
    69
    Many thanks

+ 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