97
@gpio_gwen ·

SUMIFS across 40 monthly sheets or one long table with a month column Formula Help

Inherited a workbook with one sheet per month going back three and a half years, identical layout, about 800 rows each. I need totals by category by month and eventually a chart. Do I keep the structure and write SUMIFS across all the sheets, or consolidate into one table and pivot it? Consolidating is maybe a day of work, and I have to keep the monthly sheets for other people.

7 answers Share
Report

Answering anonymously — a moderator will review it first.

  • @xlookup_lena · 7mo ago · 3 replies

    Consolidate, and do it in Power Query so the day of work turns into a refresh button. Point it at the workbook, append all the sheets, add the sheet name as a month column, load to a table, pivot from there. Cross-sheet SUMIFS with INDIRECT is possible and genuinely awful: slow, volatile, and it fails silently when someone renames a sheet or inserts a row. You will spend the same day debugging it in six months. The monthly sheets can stay exactly as they are for the humans who like them — the query reads them, it does not replace them.

    143
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @gpio_gwen · 7mo ago

      That the monthly sheets can stay is what I needed to hear. It was my whole objection.

      47
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
    • @xlookup_lena · 7mo ago

      It usually is, and it is solved. Just make sure nobody reorders columns, because the append matches on header names rather than position.

      52
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @kernel_ring_buf · 7mo ago

    One more argument for consolidating: INDIRECT is volatile, so 40 sheets of SUMIFS built on it will recalculate on every keystroke. On a workbook this size you will feel it, and it gets worse every month you add.

    76
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
  • @orm_skeptic · 7mo ago · 2 replies

    Three and a half years is 42 months and you said 40 sheets. Worth finding out which two are missing or named differently before you build anything on top.

    44
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report
    • @gpio_gwen · 7mo ago

      Two of them have a typo in the name. Good catch and slightly alarming.

      31
      Share
      Reply

      Answering anonymously — a moderator will review it first.

      Report
  • @pomodoro_pat · 7mo ago

    If you genuinely cannot consolidate, at least build a named list of sheet names and run SUMPRODUCT over INDIRECT against that list rather than writing 40 separate references. Still ugly, but a new month costs you one row instead of an edit in every formula.

    38
    Share
    Reply

    Answering anonymously — a moderator will review it first.

    Report