+ Reply to Thread
Results 1 to 5 of 5

Hiding !REF# Error using =indirect() function

  1. #1
    Registered User
    Join Date
    07-05-2009
    Location
    Brisbane
    MS-Off Ver
    Excel 2007
    Posts
    61

    Hiding !REF# Error using =indirect() function

    I am setting up a summary sheet that contains =indirect() functions for workbooks that don't exist yet.

    I would like some kind of function that returns the =indirect() function correctly if the workbook exists and just a 0 or blank if the workbook doesn't exist.

    I would like to have the indirect function in all of cells that as soon as someone creates a workbook it will update the summary sheet.

    Does anybody have a workaround for this issue.

    Thanks in advance
    Last edited by Ace of Clubs; 07-07-2009 at 02:10 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Help with =indirect() function

    Wrap your existing INDIRECT() formulas in an IFERROR...

    =INDIRECT(A1&"!B25")

    ...becomes:
    =IFERROR(INDIRECT(A1&"!B25"), "")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-05-2009
    Location
    Brisbane
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: Help with =indirect() function

    Quote Originally Posted by JBeaucaire View Post
    Wrap your existing INDIRECT() formulas in an IFERROR...

    =INDIRECT(A1&"!B25")

    ...becomes:
    =IFERROR(INDIRECT(A1&"!B25"), "")
    Thanks again.

    You are a pro.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Hiding !REF# Error using =indirect() function

    Be aware that INDIRECT will only work with external sources if they are open.

    If the external files exist but are closed you will also generate a #REF error - you may want to investigate INDIRECT.EXT available within the morefunc add-in:

    info: http://xcell05.free.fr/morefunc/english/
    download: http://download.cnet.com/Morefunc/30...-10423159.html

  5. #5
    Registered User
    Join Date
    07-05-2009
    Location
    Brisbane
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: Hiding !REF# Error using =indirect() function

    Quote Originally Posted by DonkeyOte View Post
    Be aware that INDIRECT will only work with external sources if they are open.

    If the external files exist but are closed you will also generate a #REF error - you may want to investigate INDIRECT.EXT available within the morefunc add-in:

    info: http://xcell05.free.fr/morefunc/english/
    download: http://download.cnet.com/Morefunc/30...-10423159.html
    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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