Home > Mobile >  Excel sum column's value of matching cell criteria for all the cells
Excel sum column's value of matching cell criteria for all the cells

Time:07-13

I need to sum Amount for all the dates if there is value in India row: I tried implementing with COUNTIF function but its not solving my problem, any suggestion welcome, I am pretty new to Excel formulas.

enter image description here

CodePudding user response:

Try this.

Let's assume the top left cell on your image is cell "A1". Go to cell "C6" and paste the following formula:

=IF(C2>0,C2*(SUM(C4:C5)),"")

Now fill/copy that formula across to cell "G6". Then go to cell "H6" and paste the following formula:

=SUM(C6:G6)

Hope this helps.

CodePudding user response:

What about this:

=SUMPRODUCT(C2:E2 C3:E3,C4:E4 C5:E5)

It's basically adding the two first rows, adding third and fourth rows, and taking the sumproduct. Obviously, you need to make sure not have a number in both rows one and two, and in both rows three and four.

  • Related