Forum Discussion

Rio01's avatar
Rio01
Occasional Reader
Oct 05, 2025

SUM WITH INDEX MATCH ERROR

so i want to sum all of possibility based on criteria to search value that i've adjust. the goal is to create dynamic formula that dont need to adjust per column (that's why i adjust the range formula to sum from D7:O11), so i can use it by changing the criteria only. can you guys help me on this error?

 

8 Replies

  • Patrick2788's avatar
    Patrick2788
    Silver Contributor

    If I understand the goal correctly, you might use:

    =SUM(IF((month = C13) * (Date = C14) * (Branch = C15) * (item = C16), val, 0))

    The attached workbook uses conditional formatting to highlight the values meeting the criteria so you can verify results.

     

  • =SUM(MMULT(TRANSPOSE((A5:A9=C15)*(B5:B9=C16)),TRANSPOSE(MMULT((C1:N1=C13)*(C2:N2=C14),TRANSPOSE(C5:N9)))))

    This formula works in my sample file and in modern and legacy Excel. The formula must be entered as an arrayformula with ctrl+shift+enter if someone doesn't work with Office 365 or Excel for the web or Excel 2024.

     

    • Rio01's avatar
      Rio01
      Occasional Reader

      Hi, this actually works for me. Yet, after selecting it into more larger data for example range C5:N99999 it returns error. is there any limitation on this formula for larger data set?

      • Harun24HR's avatar
        Harun24HR
        Bronze Contributor

        Would you please try SUMPRODUCT() and observe performance. I believe, it would be much faster than FILTER().

        =SUMPRODUCT((C5:N9*(C1:N1=C13)*(C2:N2=C14))*((A5:A9=C15)*(B5:B9=C16)))

         

  • Rio01's avatar
    Rio01
    Occasional Reader

    Hi Mathetes,

    Thank you for asking, you can access the case on this file https://bdfgrp-my.sharepoint.com/:x:/r/personal/muhammadreza_nugraha_external_beiersdorf_com/Documents/Documents/TES%20DATA%20STOCK.xlsx?d=w0501dd1caaf04e45950339e0127abf03&csf=1&web=1&e=Dzcs6S

    My goal is trying to sum and match every single date on formatted summary with other criterias since on raw data tab the dates are not sequential, as additional i want to minimize the effort to match the different column date on raw data by selecting all column and row to be sum (so i dont need to change manually the column later)

    can you help me to check on this formula or there's any other alternative to pull this data?

  • mathetes's avatar
    mathetes
    Silver Contributor

    Could you try again to explain what you're trying to do? And better than an image, if you could attach the actual file (or provide a link to OneDrive or some other repository), we could provide a working example of whatever solution.

    But it's not clear from your description what you want the sum to be in cell D19, and what the criteria are, or how you want to be able to change things dynamically. So give a few examples of what you mean.

    • Rio01's avatar
      Rio01
      Occasional Reader

      Hi Mathetes,

      Thank you for asking. So, ive summarized my case into this file https://bdfgrp-my.sharepoint.com/:x:/r/personal/muhammadreza_nugraha_external_beiersdorf_com/Documents/Documents/TES%20DATA%20STOCK.xlsx?d=w0501dd1caaf04e45950339e0127abf03&csf=1&web=1&e=pVsI62

      As you can see on raw data format file, the dates are not sequential. my goal is to match all of the sequential date & month column and and detail rows in formatted summary tab by using those previous formula to sum all column (so i dont need to adjust manually the column based on formatted date)

       

Resources