+ Reply to Thread
Results 1 to 3 of 3

Use "INDIRECT" Function to reference sheet

  1. #1
    Forum Contributor
    Join Date
    12-28-2006
    MS-Off Ver
    2010
    Posts
    118

    Use "INDIRECT" Function to reference sheet

    Hello, I would like to use a formula to reference a sheet and corresponding cell within that sheet. For example, in the formula below, I'd like to instead of spelling out "123" (assuming that is the sheet name) I would like to have "123" in cell A1 and use A1 in the formula. Any help is greatly appreciated, thanks!

    =SUM('123'!$O$3:INDEX('123'!$O$3:$O$75,MATCH(B2,'123'!$H$3:$H$75,0)))

  2. #2
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: Use "INDIRECT" Function to reference sheet

    first,
    '123'!$O$3 is wrong, unless the sheet name have blank like 'Sheet 1'!A1, if not, it without ['], 123!A3

    Two,
    bare in mind, Indirect, is not work when it refer to other closed workbook.
    Here the formula,

    =SUM(INDIRECT(A1&"!$O$3"),INDEX(INDIRECT(A1&"!$O$3:$O$75"),MATCH(B2,INDIRECT(A1&"!$H$3:$H$75"),0)))
    Last edited by BoredWorker; 07-01-2017 at 10:01 PM. Reason: Mistake....
    Hope you can learn every time you visit here.

    If you still confuse on how it work, kindly ask or go to
    i) Formula - Formula (Ribbon) > Formula Auditing (Section) > Evaluate Formula > Evaluate; or
    ii) VBA/Code - Click F8 to see how it work step by step.

    It it take care of your question, Please:
    Mark tread as [Solved] [Thread Tools->Mark thread as Solved]
    ;and
    Click *Add Reputation to thank anyone solved your question.

  3. #3
    Forum Contributor
    Join Date
    12-28-2006
    MS-Off Ver
    2010
    Posts
    118

    Re: Use "INDIRECT" Function to reference sheet

    Quote Originally Posted by BoredWorker View Post
    first,
    '123'!$O$3 is wrong, unless the sheet name have blank like 'Sheet 1'!A1, if not, it without ['], 123!A3

    Second,
    =SUM('123'!$O$3:INDEX('123'!$O$3:$O$75,MATCH(B2,'123'!$H$3:$H$75,0)))
    if it only sum for two number, should use comma[,] istead of :

    third,
    bare in mind, Indirect, is not work when it refer to other closed workbook.
    Here the formula,

    =SUM(INDIRECT(A1&"!$O$3"),INDEX(INDIRECT(A1&"!$O$3:$O$75"),MATCH(B2,INDIRECT(A1&"!$H$3:$H$75"),0)))
    This worked out great, thanks!

    As far as your other points, "123" was just a generic name I put in, I believe you are correct it was Sheet 1 prior.
    The sum is for a column, so I went with the colon

    Appreciate the great feedback and sorry for the confusion.

+ 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] drag-down of indirect function does not change cell reference within " "
    By alsan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2016, 07:09 AM
  2. How to update cell reference when "dragging" and INDIRECT forumla
    By mikicia in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-10-2014, 04:48 PM
  3. Circular Reference? - INDIRECT and CELL("filename") Usage
    By Nicked in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2012, 01:20 PM
  4. [SOLVED] Variable "sheet-name" and "range-name" wanted in INDEX/MATCH-function
    By Fiebuls in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-01-2012, 04:09 PM
  5. Replies: 4
    Last Post: 10-29-2009, 12:08 PM
  6. [SOLVED] Please add a "sheet" function like "row" and "column" functions
    By Spreadsheet Monkey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2005, 12:15 PM
  7. "Indirect" reference to a cell in a code: how to do it?
    By bondcrash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2005, 12:05 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