• Stumped by INDIRECT and an external 3D reference

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Stumped by INDIRECT and an external 3D reference

    Author
    Topic
    #479425

    This one has me seriously stumped.
    I’d like to total a series of cells holding overtime hours
    normally, I’d use =SUM([WeeklyTimeSheetV4.xlsx]Week1:Week6!$K$26)
    However, I’m totally them in a separate workbook and the names of the timesheets will vary with the name of the person submitting the timesheet.
    With great confidence I went ahead and used:
    =SUM(INDIRECT(“‘”&B2&”Week1:Week6!$K$26”)) which resulted in a ref error. And since then I’ve been trying all sorts of combinations and permutations of indirect, transpose, address, index and many others. None of which have gotten me anywhere.
    I couldn’t even use indirect with a range formula in the timesheet, that totalled the values in K26 across the 6 sheets.
    Ultimately, I’ve referred to a cell I’m going to hide that will total the amount in the timesheet. This works, but the fact that SUM & INDIRECT did not work the way I anticipated – bugs me.
    Does anyone else have a comment or suggestion?

    Viewing 6 reply threads
    Author
    Replies
    • #1301548

      Catharine,

      Per the help file

      Note The INDIRECT function only returns the result of a reference to an open file. If a workbook that the INDIRECT function is indirectly referencing is closed, the function returns a #REF! error.

      . You might also want to consult the help file for the way they construct the reference is slightly different than yours. :cheers:

      Update: Seems that things work fine with standard references but returns REF with 3D references. This Article seems to confirm that.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #1301642

      Interesting newsletter!

      • #1302078

        hello

        When the INDIRECT function operates on this array, the expected array of
        values appear (by highlighting in the formula bar and pressing F9), but
        for some reason this array cannot be used by Excel functions. The use of
        the N function creates an array that can be used, so that the SUM function
        returns the desired result.

        Access platform

        • #1302137

          Hey, thanks! I hadn’t tried the N function.
          Here is a sample of the formula:
          =SUM(N(INDIRECT(“‘”&B2&”Week”&{1,2,3,4,5,6}&”‘!$K$26”)))

    • #1302147

      Nortannoel was just quoting the newsletter you found “interesting”…

      Steve

    • #1302149

      Its’ on my To Be Read pile 😉

    • #1302150

      What else could we do with the N function?

    • #1302182

      One “trick” one can do with it, is to annotate formulas. Since it converts text to a zero you can use it like:

      =MyFormula + N(“This is an example formula”)

      to annotate rather than adding a comment…

      Steve

    • #1302803

      Nifty and useful if you have a megaformula you want to remember how it was put together.

    Viewing 6 reply threads
    Reply To: Stumped by INDIRECT and an external 3D reference

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: