Excel sumif based on a changing critia

29 Views Asked by At

I have tried using the SUMIF( INDEX( MATCH( function to bring back the total value of two criteria, a row that is constant and a column that changes as I enter a month,

=IFERROR(SUMIF(Budget!$D$8:$D$62,
  $B9,
  INDEX(Budget!$R$8:$AC$62,
    MATCH($I$1,Budget!$R$6:$AC$6,0),0)),0)

this is only bringing back the first data entry it finds in the row, how can bring back the total number. I have been advised to use SUMIFS but I'm not sure how to include the column to be used based on the month entered.

1

There are 1 best solutions below

0
On

you mention your column changes hence using INDEX and MATCH,

But the match is done for the ROW of the INDEX, not the COLUMN,

I may be wrong but try this:

=IFERROR(SUMIF(Budget!$D$8:$D$62,$B9,INDEX(Budget!$R$8:$AC$62,0,MATCH($I$1,Budget!$R$6:$AC$6,0))),0)