+ Reply to Thread
Results 1 to 6 of 6

INDIRECT working, but then returns error ?

  1. #1
    Registered User
    Join Date
    01-14-2008
    Posts
    30

    INDIRECT working, but then returns error ?

    I am using the INDIRECT function to call a vlookup. But it then returns the value of the vlookup and tries to evaluate that (the value is 11 if you happen to care), and this causes an error because INDIRECT cant evaluate 11


    my code:
    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: INDIRECT working, but then returns error ?

    So what do you want the result to be?

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

    Re: INDIRECT working, but then returns error ?

    What are you wanting to use INDIRECT for. Unless I'm being unusually slow, it doesn't seem to be playing any role at all.
    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

  4. #4
    Registered User
    Join Date
    01-14-2008
    Posts
    30

    Re: INDIRECT working, but then returns error ?

    @Gak67 Well i need it to return 11, but it returns an error instead because it gives 11 to the INDIRECT function

    @Glenn It is just a matter of optimizing a work procedure, I need to change the name of alot of sheets called by vlookup each month. It would be faster if i could use an INDIRECT call which has as one of more inputs the new sheet name. (ofcourse i could use search and replace, but in this case it would be very laborious to do)

    Thanks for the fast answers guys!

  5. #5
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: INDIRECT working, but then returns error ?

    I think you need something like
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  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
    53,048

    Re: INDIRECT working, but then returns error ?

    INDIRECT() is used to convert text into something that excel can use in a formula. The way you have that syntax, it looks like you dont even need it. If you are trying to insert a sheet name into the formula, then maybe what gak suggested?
    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

+ 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. indirect returns #REF! regardless of where it is used.
    By Shaz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2022, 07:44 PM
  2. [SOLVED] Working UDF returns #VALUE Error when reopening workbook, even after Recalculation.
    By excelabc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-16-2013, 05:20 PM
  3. formula working on spreadsheet returns #value error when run by vba
    By bachree in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2012, 01:23 AM
  4. INDIRECT.EXT returns #VALUE
    By geoB in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-08-2010, 12:19 PM
  5. Help, Indirect returns #REF
    By Swift4Play in forum Excel General
    Replies: 1
    Last Post: 09-29-2010, 05:15 AM

Tags for this Thread

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