简体   繁体   中英

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

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.

在此处输入图像描述

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM