+ Reply to Thread
Results 1 to 5 of 5

#VALUE error in INDIRECT function

  1. #1
    Registered User
    Join Date
    01-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    5

    #VALUE error in INDIRECT function

    I have a table, starting at cell A2, like this:
    List1 List2 List3
    John Gail Steven
    Betty Mark Mark
    Bill John John

    and a named range called Selected_Lists like this:
    List1
    List2
    List3

    The array formula {=IF(INDIRECT({"R2C1"},FALSE)=Selected_Lists,TRUE)} gives a #VALUE error.
    If I highlight just the INDIRECT({"R2C1"},FALSE) portion and hit F9, it correctly evaluates to {"List1"}.

    If I hardcode the cell R2C1 result into the formula like this:
    =IF({"List1"}=Selected_Lists,TRUE)

    It works just fine.

    Why am I getting a data type mismatch with the INDIRECT function, and how can I correct it?

    Thanks!

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: #VALUE error in INDIRECT function

    function INDEX will do it

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: #VALUE error in INDIRECT function

    What are you trying to accomplish with that formula?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    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,052

    Re: #VALUE error in INDIRECT function

    Quote Originally Posted by tim201110 View Post
    function INDEX will do it
    Sorry, but that would hardly explain to a newbie how to use 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

  5. #5
    Registered User
    Join Date
    01-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: #VALUE error in INDIRECT function

    Thanks everyone. That actually did point me in the right direction. I should have thought of INDEX.

    Here is what I ended up with so far:
    =IF(MATCH(INDEX(List_Table[#Headers],1,TRUNC((ROW()-ROW($M$27))/ROWS(List_Table))+1),Selected_Lists,0)>0,1,0)

    This is just an intermediate step for a larger formula I am developing, but this part produces the desired results now. Thanks for the help.

+ 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 Function getting a #Value Error
    By bblackwelder in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2014, 09:54 PM
  2. COUNTIFS and INDIRECT function return #VALUE error - don't know why?
    By MikeRoot in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-26-2014, 02:37 PM
  3. [SOLVED] Help Solving #REF error (INDIRECT function)
    By omni13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-15-2014, 10:01 AM
  4. [SOLVED] Indirect function giving #REF! error
    By mqdias in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-03-2013, 10:21 AM
  5. Hiding !REF# Error using =indirect() function
    By Ace of Clubs in forum Excel General
    Replies: 4
    Last Post: 07-07-2009, 02:20 AM
  6. Error using Excel add-in with INDIRECT.EXT function
    By Barb Reinhardt in forum Excel General
    Replies: 3
    Last Post: 10-06-2005, 12:05 PM
  7. INDIRECT function error
    By Anthony Slater in forum Excel General
    Replies: 3
    Last Post: 02-21-2005, 03:06 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