+ Reply to Thread
Results 1 to 6 of 6

include string or text value in cell reference

  1. #1
    nelly
    Guest

    include string or text value in cell reference

    Hi,

    does anyone know how/if i can include a cell value within a path in a
    function/formula so i can update it by simply changing cell value,
    e.g.


    SUM($A$1, '[E:\folder\stats June.xls]'!sheet1$A$1)

    so that the 'June' part can change according to a cell value, say F1.
    So if I change F1 from "June" to "July" then the SUM formula would
    change to show ....'\stats July' .

    many thanks in advance, Nelly


  2. #2
    Gary''s Student
    Guest

    RE: include string or text value in cell reference

    Use the INDIRECT() function
    --
    Gary''s Student


    "nelly" wrote:

    > Hi,
    >
    > does anyone know how/if i can include a cell value within a path in a
    > function/formula so i can update it by simply changing cell value,
    > e.g.
    >
    >
    > SUM($A$1, '[E:\folder\stats June.xls]'!sheet1$A$1)
    >
    > so that the 'June' part can change according to a cell value, say F1.
    > So if I change F1 from "June" to "July" then the SUM formula would
    > change to show ....'\stats July' .
    >
    > many thanks in advance, Nelly
    >
    >


  3. #3
    CLR
    Guest

    RE: include string or text value in cell reference

    Check out the INDIRECT Worksheet Function......

    Returns the reference specified by a text string. References are immediately
    evaluated to display their contents. Use INDIRECT when you want to change the
    reference to a cell within a formula without changing the formula itself.

    Vaya con Dios,
    Chuck, CABGx3



    "nelly" wrote:

    > Hi,
    >
    > does anyone know how/if i can include a cell value within a path in a
    > function/formula so i can update it by simply changing cell value,
    > e.g.
    >
    >
    > SUM($A$1, '[E:\folder\stats June.xls]'!sheet1$A$1)
    >
    > so that the 'June' part can change according to a cell value, say F1.
    > So if I change F1 from "June" to "July" then the SUM formula would
    > change to show ....'\stats July' .
    >
    > many thanks in advance, Nelly
    >
    >


  4. #4
    nelly
    Guest

    Re: include string or text value in cell reference


    CLR wrote:
    > Check out the INDIRECT Worksheet Function......
    >
    > Returns the reference specified by a text string. References are immediately
    > evaluated to display their contents. Use INDIRECT when you want to change the
    > reference to a cell within a formula without changing the formula itself.



    Hi, can't quite figure out how I should use indirect - if I currently
    have this function

    SUM($A$3, '[E:\folder\stats June.xls]sheet1'!$A$1) in a cell

    and cell F1 currently holds the text June - I want to then change the
    text in F1 to hold July and the above formula to then change to the
    following automatically

    SUM($A$3, '[E:\folder\stats July.xls]sheet1'!$A$1)

    please can you elaborate - thank you


  5. #5
    Dave Peterson
    Guest

    Re: include string or text value in cell reference

    You'd want to use the =indirect() function, but that only works when the
    "sending" workbook is open.

    But Harlan Grove wrote a UDF called PULL that will retrieve the value from a
    closed workbook.

    You can find the function at Harlan's FTP site:
    ftp://members.aol.com/hrlngrv/
    Look for pull.zip

    Laurent Longre has an addin (morefunc.xll) at:
    http://xcell05.free.fr/

    That includes =indirect.ext() that may help you.

    nelly wrote:
    >
    > Hi,
    >
    > does anyone know how/if i can include a cell value within a path in a
    > function/formula so i can update it by simply changing cell value,
    > e.g.
    >
    > SUM($A$1, '[E:\folder\stats June.xls]'!sheet1$A$1)
    >
    > so that the 'June' part can change according to a cell value, say F1.
    > So if I change F1 from "June" to "July" then the SUM formula would
    > change to show ....'\stats July' .
    >
    > many thanks in advance, Nelly


    --

    Dave Peterson

  6. #6
    Pete_UK
    Guest

    Re: include string or text value in cell reference

    Try this:

    =SUM($A$3,INDIRECT("'[E:\folder\stats "&F1&".xls]sheet1'!$A$1"))

    Hope this helps.

    Pete

    nelly wrote:
    > CLR wrote:
    > > Check out the INDIRECT Worksheet Function......
    > >
    > > Returns the reference specified by a text string. References are immediately
    > > evaluated to display their contents. Use INDIRECT when you want to change the
    > > reference to a cell within a formula without changing the formula itself.

    >
    >
    > Hi, can't quite figure out how I should use indirect - if I currently
    > have this function
    >
    > SUM($A$3, '[E:\folder\stats June.xls]sheet1'!$A$1) in a cell
    >
    > and cell F1 currently holds the text June - I want to then change the
    > text in F1 to hold July and the above formula to then change to the
    > following automatically
    >
    > SUM($A$3, '[E:\folder\stats July.xls]sheet1'!$A$1)
    >
    > please can you elaborate - thank you



+ 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