+ Reply to Thread
Results 1 to 4 of 4

INDIRECT in an IF Statement to dynamically reference worksheets

  1. #1
    Registered User
    Join Date
    09-13-2018
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    27

    INDIRECT in an IF Statement to dynamically reference worksheets

    Hi,

    I am having a hard time with the syntax for indirect.

    (IF($L$4="All",1,Table1[Type] =$L$4))

    In my setup G40 holds a sheet name and $L$4 are a specific value located in the sheet which G40 holds. I need a way to place indirect around both L4's so that it has the sheet reference behind it.

    Any help would be amazing.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: INDIRECT in an IF Statement to dynamically reference worksheets

    Never mind INDIRECT... I don't see how this formula works at all. Does it work??

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    09-13-2018
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    27

    Re: INDIRECT in an IF Statement to dynamically reference worksheets

    Sorry this is just the piece of the overall formula but this specific part is giving me issues, everything else works fine.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,101

    Re: INDIRECT in an IF Statement to dynamically reference worksheets

    I asked you to provide a sample sheet. You didn't... so I cannot test this. If it doesn't work, I won't be able to advise you why...

    (IF(INDIRECT"'"&$G$40&"'!L4")="All",1,Table1[Type] =INDIRECT"'"&$G$40&"'!L4")))

+ 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] How to populate a list from an indirect reference using an IF statement.
    By Broderick in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-07-2015, 01:14 AM
  2. Can you make 1 file reference 30+ other files dynamically withour indirect()?
    By treepio in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-27-2015, 08:15 AM
  3. Help Modify Formulas to Work with INDIRECT to Dynamically Reference Worksheets
    By Fin Fang Foom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-11-2014, 07:26 PM
  4. 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
  5. INDIRECT to Reference Worksheets #Ref Error
    By McToons in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2011, 03:46 AM
  6. 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
  7. 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