+ Reply to Thread
Results 1 to 3 of 3

Inserting text, as a named variable, into a cell reference on another worksheet

  1. #1
    Registered User
    Join Date
    02-19-2012
    Location
    Fort Myers, FL
    MS-Off Ver
    Office / Excel 365
    Posts
    2

    Inserting text, as a named variable, into a cell reference on another worksheet

    Hi all.

    I would like to insert text from a named variable into a cell reference.

    Background

    I have created an array formula to determine the cell reference of the first cell that has a positive number in a specific row.
    The array calculates the cell address for the first cell with a positive number, for example: $E$45.
    I have defined a name for the cell with the array that delivers the above result. Variable name = "first_year"
    Next, I would like to use the variable name "first_year" [value = $E$45] as a variable cell reference >in another spreadsheet< within a percentage change formula:

    Example—trying to calculate: ($100,000 - $50,000) / $50,000 = 100%
    FORMULA =('Consolidated Income'!K45-'Consolidated Income'!$E$45)/'Consolidated Income'!$E$45
    Does not work: =('Consolidated Income'!K45-'Consolidated Income'!first_year)/'Consolidated Income'!first_year

    ... and of course, I can't figure out how to do it. But someone knows how.

    Assistance appreciated. Thanks.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Inserting text, as a named variable, into a cell reference on another worksheet

    Try it like this:

    =('Consolidated Income'!K45-INDIRECT("'Consolidated Income'!"&first_year))/INDIRECT("'Consolidated Income'!"&first_year)

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    02-19-2012
    Location
    Fort Myers, FL
    MS-Off Ver
    Office / Excel 365
    Posts
    2

    Re: Inserting text, as a named variable, into a cell reference on another worksheet

    Thank you Pete. That worked.

+ 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. Create a named range of cells BUT variable in reference to a cell value
    By peponfree in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 02-13-2014, 12:46 PM
  2. Replies: 3
    Last Post: 10-29-2013, 12:06 AM
  3. Inserting a variable in a Table Heading reference
    By dlythgoe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2009, 04:47 PM
  4. Inserting a variable into a linked reference?
    By Scej12 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2007, 01:26 PM
  5. Replies: 1
    Last Post: 06-03-2006, 10:55 PM

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