快速更改Excel COUNTIF函数的结果

You're comfortable with Excel, and can change formulas on the fly, when necessary. If you're creating Excel workbooks for other people to use, their Excel skills probably aren't as strong as yours.

您对Excel很满意,并且可以在需要时随时更改公式。 如果要创建供其他人使用的Excel工作簿,则他们的Excel技能可能不如您的熟练。

Last month we looked at the COUNTIF formula, and how you can type an operator, then refer to a worksheet cell, to set a minimum value for counting.

上个月,我们研究了COUNTIF公式 ,以及如何键入运算符,然后引用工作表单元格来设置计数的最小值。

countifop02

In the comments, Kanti Chiba mentioned that the operator could be included in that referenced cell.

在评论中,坎蒂·千叶(Kanti Chiba)提到该引用的单元格中可以包含运算符。

For example, you could type >=50 in a cell, and refer to that cell in the formula.

例如,您可以在一个单元格中键入> = 50,然后在公式中引用该单元格。

创建操作员列表 (Create a List of Operators)

I usually keep the operator in the formula, so it's separate from the number, and users won't have to worry about typing it. Kanti's comment made me think about other options, and how we could let users select both the operator and the target number.

我通常将运算符保留在公式中,因此它与数字分开,并且用户不必担心键入它。 Kanti的评论使我考虑了其他选项,以及如何让用户选择运营商和目标号码。

So, I typed a list of operators on a different sheet in the workbook, and named that list as OpList.

因此,我在工作簿的另一张纸上键入了一个运算符列表,并将该列表命名为OpList。

CountIfOpList01

添加运算符的下拉列表 (Add a Drop Down List of Operators)

The next step was to create a drop down list of operators, in the cell to the left of the Score input cell. I used data validation to create the drop down list, then selected one of the operators.

下一步是在“分数”输入单元格左侧的单元格中创建一个运算符下拉列表。 我使用数据验证来创建下拉列表,然后选择其中一个运算符。

CountIfOpList02

更改COUNTIF公式 (Change the COUNTIF Formula)

The final step was to change the COUNTIF formula, so it refers to the Operator cell. Now the COUNTIF formula results will change, if a different operator is selected.

最后一步是更改COUNTIF公式,因此它引用了Operator单元。 现在,如果选择了其他运算符,则COUNTIF公式的结果将更改。

CountIfOpList03

观看视频 (Watch the Video)

To see the steps for creating a COUNTIF formula with a drop down list of operators, please watch this short Excel tutorial video.

要查看使用运算符下拉列表创建COUNTIF公式的步骤,请观看这​​段简短的Excel教程视频。

演示地址

翻译自: https://contexturesblog.com/archives/2010/07/09/quickly-change-results-for-excel-countif-function/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值