+ Reply to Thread
Results 1 to 6 of 6

Formula with WorkSheet Name

  1. #1
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Formula with WorkSheet Name

    I have a value in cell named Cost of Sheet1

    Cell F9 in Sheet2 holds the Sheet Name which is Sheet1

    I have typed in this formula in Sheet2:

    ="='"&F9&"'!"&"Cost"
    and what I am Getting is:
    ='Sheet1'!Cost
    Why am I not getting the value of Cost?

    Thanks

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Formula with WorkSheet Name

    Because you are not including a cell ref?

    Another way of doing this is...
    =INDIRECT("'"&F9&"!'B4")

    Or if Cost is a range name...
    =cost
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula with WorkSheet Name

    If you have a named cell called Cost on Sheet1, why not just use

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    on sheet 2?

    You seem to be over complicating this.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Re: Formula with WorkSheet Name

    Thank you FDibbins, the "INDIRECT" fixed the problem.

  5. #5
    Forum Contributor
    Join Date
    03-02-2014
    Location
    usa
    MS-Off Ver
    MS 365
    Posts
    593

    Re: Formula with WorkSheet Name

    Richard,
    Thank you for the response;
    I could not use =Cost because I have "Cost" in multiple worksheets, so I had to have the SheetName in front" 'SheetName'!Cost
    Thanks

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Formula with WorkSheet Name

    hmm you cannot have the same range name repeated within a workbook, so perhaps its not a range name after all?

+ 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. [SOLVED] Loop formula on one worksheet until empty cell on another worksheet
    By Natstin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2013, 11:16 PM
  2. Dynamically add Worksheet / rename / update the formula to include the new worksheet
    By Rajnishbhatt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-30-2012, 12:31 AM
  3. Excel 2010 Macro to copy worksheet, update formula and rename worksheet
    By madmak0203 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:18 PM
  4. Replies: 5
    Last Post: 02-06-2012, 12:36 PM
  5. Fill a column in a worksheet from a formula worksheet based on the date
    By NadiaR in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2006, 06:45 PM

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