+ Reply to Thread
Results 1 to 3 of 3

Working with Defined Names

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    Working with Defined Names

    And specifically, I went to my Name Manager and added a name "K_LastDirRowActive", then gave it the value of "3". Great. The Name Manager shows a new entry entitled K_LastDirRowActive, shows it has a value of 3 and in the column "Refers to" shows "=3"

    How do I call it so I get "3" and not "=3"?

    When I try ThisWorkbook.Names("K_LastDirRowActive").Value I get "=3"
    When I try ThisWorkbook.Names("K_LastDirRowActive").RefersTo I get "=3"

    That does not make a heck of a lot of sense to me, but I am sure someone at MS had a good reason.

    I have not touched "names" other than named ranges in many years, I apologize as I suspect this is a rather basic question! I would simply take the darned value and strip the "=" off of it, but I want to use this storage more and best learn to do it right.

    Thank-you-

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Working with Defined Names

    Hello brumemc777,

    The properties Value and RefersTo are equivalent. They both return the cell's formula as a string, always perfixed with an equals sign.

    You can get the value of the cell formula by using Evaluate.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    583

    Re: Working with Defined Names

    Very strange; I was under the impression I responded to this yesterday. Providing for the possibility that I am going nuts-

    Thank-you very much for this. Not only a solution to the confusion, but in initial research into once again learning what the heck "evaluate" does, you have set me onto what appears to be a very valuable tool!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Defined Names Not Working on Specific Sheet
    By realvirtuality1 in forum Excel General
    Replies: 3
    Last Post: 03-04-2015, 12:12 PM
  2. [SOLVED] Error Message on Cell References, Range Names, Defined Names, etc.
    By BLS99covert in forum Excel General
    Replies: 2
    Last Post: 12-29-2014, 05:37 PM
  3. Previously working code is now is now giving Application-defined or object-defined error
    By ready2learn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2014, 07:22 PM
  4. Replies: 1
    Last Post: 05-14-2012, 10:14 AM
  5. Regarding Defined names
    By Chandana_Gadugu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-03-2009, 07:47 AM
  6. Defined Names
    By MGT2000 in forum Excel General
    Replies: 2
    Last Post: 12-11-2008, 10:41 AM
  7. Why doesn't working? Application-defined or object-defined error
    By SupperDuck in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2006, 11:00 AM

Tags for this Thread

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