+ Reply to Thread
Results 1 to 3 of 3

Help Modify Formulas to Work with INDIRECT to Dynamically Reference Worksheets

  1. #1
    Registered User
    Join Date
    07-18-2006
    Posts
    24

    Help Modify Formulas to Work with INDIRECT to Dynamically Reference Worksheets

    Hi,

    I would like to get the INDIRECT function integrated with these formulas below, so they are reference to worksheet name.


    =IFERROR(1/(1/(LARGE(IF('Q1 Year 1'!$B$2:$B$26=Summary!$A$2,CHOOSE(1+(LEFT(A$3,1)="C"),'Q1 Year 1'!$H$2:$H$26,'Q1 Year 1'!$I$2:$I$26)),ROWS($K$1:$K1)))),"")

    =IFERROR(INDEX('Q1 Year 1'!$E$2:$E$26,MATCH(I3,'Q1 Year 1'!$D$2:$D$26,0)),"")

    =LOOKUP(REPT("z",255),CHOOSE({1,2,3},"",INDEX('Q1 Year 1'!$D$2:$D$26,SMALL(IF('Q1 Year 1'!$H$2:$H$26=K3,ROW($K$2:$K$26)-ROW(K$2)+1),COUNTIF(K$3:K3,K3))),INDEX('Q1 Year 1'!$D$2:$D$26,SMALL(IF('Q1 Year 1'!$I$2:$I$26=K3,ROW($K$2:$K$26)-ROW(K$2)+1),COUNTIF(K$3:K3,K3)))))


    Example Below...


    =IFERROR(1/(1/(LARGE(IF(INDIRECT("'"&B2&'!"&"$B$2:$B$26")=Summary!$A$2,CHOOSE(1+(LEFT(A$3,1)="C"),INDIRECT("'"&B2&'!"&"$H$2:$H$26"),INDIRECT("'"&B2&'!"&"$I$2:$I$26"))),ROWS($K$1:$K1)))),"")


    Any help to get this to work?
    Last edited by Fin Fang Foom; 12-11-2014 at 07:26 PM.

  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,933

    Re: Help Modify Formulas to Work with INDIRECT to Dynamically Reference Worksheets

    Hard to say without seeing what you are dealing with, but have you considered using named ranges instead of INDIRECT?

    Assuming B2 contains a sheet name, build that into named ranges on that sheet, eg JanProfit or FebExpenses etc, then reference that
    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
    Registered User
    Join Date
    07-18-2006
    Posts
    24

    Re: Help Modify Formulas to Work with INDIRECT to Dynamically Reference Worksheets

    I'll try that. And post tomorrow if I can't get it to work.

    And yes cell B2 is the worksheet name.


    =IFERROR(1/(1/(LARGE(IF(INDIRECT("'"&B2&'!"&"$B$2:$B$26")=Summary!$A$2,CHOOSE(1+(LEFT(A$3,1)="C"),INDIRECT("'"&B2&'!"&"$H$2:$H$26"),INDIRECT("'"&B2&'!"&"$I$2:$I$26"))),ROWS($K$1:$K1)))),"")

+ 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] Using Indirect to link dynamically with another work book
    By Journeyman3000 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-27-2014, 07:31 PM
  2. indirect reference in macro to select different worksheets
    By bengubb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2013, 05:38 PM
  3. INDIRECT to Reference Worksheets #Ref Error
    By McToons in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2011, 03:46 AM
  4. How to dynamically reference a range of worksheets
    By Sarah-Ann in forum Excel General
    Replies: 2
    Last Post: 01-26-2011, 01:05 PM
  5. Indirect reference and worksheets with single quote in the name
    By ted_thompson61 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-27-2005, 03: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