简体   繁体   中英

How can I only count cells if a different cell is a specific value?

I have a range of cells that have different numbers. Each cell has another cell next to it which can contain OPEN or CLOSED. I only want to SUM the cells if their status cell says OPEN.

Here's an example of what the number and status looks like

例

Adjust for your own columns and ranges:

=SUMPRODUCT(--(B2:B10="OPEN")*(A2:A10))

You could also use SUMIF() or SUMIFS().

SUMIF通常优选用于与条件求和

=SUMIF(B:B,"Open",A:A)

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