+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    10-26-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Indirectly refer to function

    I'm trying to call a function that is stored in a cell as a text string.

    In cell A1, I have the text Sum('Sheet1:Sheet3'!C3). I want to call this function from a different cell. Is this possible using the pre-defined functions, or would I be better creating my own function?
    Last edited by andy_b; 10-29-2009 at 01:49 PM.

  2. #2
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Indirectly refer to function

    Hi,

    With the VBA function : Evaluate, you can get your formula strings to be executed ...

    HTH

  3. #3
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Indirectly refer to function

    This will attempt to resolve the text in the cell noted:
    Code:
    Public Function ResolveText(Rng As Range)
        ResolveText = Evaluate(Rng.Text)
    End Function

    Used as
    =RESOLVETEXT(A1)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    10-26-2009
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Indirectly refer to function

    Fantastic - thanks very much.

  5. #5
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    18,225

    Re: Indirectly refer to function

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

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.2.0