gpt4 book ai didi

google-sheets - 如果值为lotto,则google sheet countif并过滤掉其他列

转载 作者:行者123 更新时间:2023-12-04 08:12:17 27 4
gpt4 key购买 nike

我有一个专栏

COLUMN H | Column R

trading type | Closed P&L
Lotto | 100%
Lotto | 200%
| 100%
Day | -50%
试图排除任何交易类型 = Lotto 的行并计算“非乐透”中奖率。很好奇我怎么能这样做?
因此,在这种情况下,非乐透交易总数为 2,并且只有 1 次获胜 (>0%) => 50% 获胜率。
这似乎不起作用
=countif(R2:R148,">0")/COUNT(R2:R165, H:H, "Lotto")
这将返回 N/A
=countif(R2:R148,">0", H:H, "Lotto")/COUNT(R2:R165, H:H, "Lotto")

最佳答案

使用 COUNTIFS获得非 Lotto值为正的情况下,将其除以非总数Lotto案例:

=COUNTIFS(H2:H5,"<>Lotto",R2:R5,">0")/COUNTIF(H2:H5,"<>Lotto")
enter image description here

关于google-sheets - 如果值为lotto,则google sheet countif并过滤掉其他列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65893968/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com