Search code examples
excelexcel-formulaworksheet

Excel, Calculate Sum of one column where the corresponding row in another column equals a value


So I have the following formula which works perfectly to calculate the SUM of an entire column of another worksheet which I reference indirectly.

=SUM(INDIRECT(A4&"!C:C"))

What I need now is to calculate the SUM of C (as above) but only when the relevant row in Column D is equal to Yes.

Can this be done?

Thanks,


Solution

  • Try this

    =SUMIF(INDIRECT(A4&"!D:D"),"Yes",INDIRECT(A4&"!C:C"))