Forum Discussion

angie07's avatar
angie07
Copper Contributor
Nov 25, 2022
Solved

SUMIF Formula

Hi,  I would like to be able to drag the SUMIF formula as the criteria is the same but the sum range changes. The Sum range is available on a different excel tab and can be found after every 4 colum...
  • Patrick2788's avatar
    Patrick2788
    Nov 26, 2022

    angie07 

    I wrote this with compatibility in mind. If your version of Excel has FILTER, this will work.  Sample workbook included!

     

    =LET(
        data, 'Tab 1'!$AD$6:$AP$1317,
        store, 'Tab 1'!$D$6:$D$1317,
        r, SEQUENCE(ROWS(data)),
        c, SEQUENCE(, INT(COLUMNS(data) / 3), 1, 4),
        matrix, INDEX(data, r, c),
        f, FILTER(INDEX(matrix, r, COLUMN(A1)), store = $B2),
        SUM(f)
    )

      

Resources