+ Reply to Thread
Results 1 to 7 of 7

Indirect Formula Causes #N/A Error

  1. #1
    Forum Contributor
    Join Date
    06-23-2010
    Location
    Iowa, United States
    MS-Off Ver
    Excel 2007
    Posts
    145

    Indirect Formula Causes #N/A Error

    Hello all,

    I am having an issue with the indirect formula. What I am trying to do is more complex, but I believe I have dug down to the root of my error.

    This formula works wonderfully:

    Please Login or Register  to view this content.
    However, I receive the lovely "#N/A" error when I add in Indirect:

    Please Login or Register  to view this content.
    I appreciate any help or suggestions. Thanks

    Steve

    Edit: I can attach the workbook if needed.
    Last edited by Steve0492; 05-21-2013 at 03:20 AM.
    A VBA novice, excited to learn!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Indirect Formula Causes #N/A Error

    hi Steve. not sure what are you trying to achieve. usually, people use it in a case where they might have several sheets like:
    April4
    May4
    Jun4

    so say i have "April4" in A2. then i would use:
    =SUMPRODUCT((INDIRECT(A2&"!F2:F20001")='Weekly Performance'!C4)*(April4!$J$2:J20001))

    the above would be equivalent to your first formula. but if i change A2 to "May4", then it becomes an equivalent of:
    =SUMPRODUCT((May4!$F$2:F20001='Weekly Performance'!C4)*(April4!$J$2:J20001))

    and why do you fix the $F$2 portion. are you going to copy down & make it F2:F20002?

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Indirect Formula Causes #N/A Error

    ..Edit: I can attach the workbook if needed.
    Pls do it explaing what is your goal using INDIRECT in your formula.

    Also check what results do you get if you use correctly the ranges..

    =SUMPRODUCT((INDIRECT("April4!$F$2:F19999")='Weekly Performance'!C4)*(April4!$J$2:J20000))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Contributor
    Join Date
    06-23-2010
    Location
    Iowa, United States
    MS-Off Ver
    Excel 2007
    Posts
    145

    Re: Indirect Formula Causes #N/A Error

    Benishiryo,

    Thanks for the reply. You are spot on about what I am trying to do. I have an input cell which changes each week. My first thought was to try the formula you gave me, but it gave me a #REF error. As did many other iterations that I tried.

    Yes, I need to fix the $F$2 portion. This is a spreadsheet I recently inherited and am trying to cleanup.

    Steve

  5. #5
    Forum Contributor
    Join Date
    06-23-2010
    Location
    Iowa, United States
    MS-Off Ver
    Excel 2007
    Posts
    145

    Re: Indirect Formula Causes #N/A Error

    Problem Spreadsheet.xlsxThe formulas are in Column I, I have highlighted it. Please let me know if you need any more info. Thanks!

    Steve

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Indirect Formula Causes #N/A Error

    if i'm not wrong:
    =SUMPRODUCT((INDIRECT("'"&$O$12&"'!F2:F19998")='Weekly Performance'!C2)*(INDIRECT("'"&$O$12&"'!J2:J19998")))

    it will still show a REF error because you don't have a May4 sheet. when you do, it should work fine

  7. #7
    Forum Contributor
    Join Date
    06-23-2010
    Location
    Iowa, United States
    MS-Off Ver
    Excel 2007
    Posts
    145

    Re: Indirect Formula Causes #N/A Error

    And thus the problem is solved. Thanks for the help. I can't believe I've been struggling over such an obvious solution..

    Steve

+ 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