简体   繁体   中英

Google Sheets, how to count if text is set column is set to true

I have a Google sheets with the following layout

Key Points  Category    Done
1     4       A          Yes
2     4       B 
3     1       B 
4     5       C          Yes
5     7       D          Yes
6     4       B 
7     2       C          Yes

I need a formula that can sum the points based on category if the Done is "yes". So the output should be

Points done    Category
7                C
4                A
7                D

Whch formula can I use for this? (I don't want to use pivot table)

try:

=QUERY({A2:D}; "select sum(Col2),Col3 where Col4 = 'Yes' group by Col3 label sum(Col2)''")

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