if函数和and函数嵌套_在Excel中嵌套IF函数

if函数和and函数嵌套

The IF function lets you test something in Excel, and show one result if the test result is TRUE, and another result for FALSE. For example:

IF函数使您可以在Excel中进行测试,如果测试结果为TRUE,则显示一个结果,对于FALSE,则显示另一个结果。 例如:

=IF(“Debra met Excel MVPs last week”,”Show Picture”,”No Picture”)

= IF(“ Debra上周遇到了Excel MVP”,“显示图片”,“没有图片”)

And yes, I did meet some Excel MVPs last week, and you can see a picture at the end of this article.

是的,上周我确实遇到了一些Excel MVP,您可以在本文结尾看到图片。

检查单元格值 (Check Cell Value)

As another example of the IF function, you can check the value in a cell, and show “Good” if the value is $20,000 or more. For lower amounts, the result is “Poor”.

作为IF函数的另一个示例,您可以检查单元格中的值,如果该值是$ 20,000或更高,则显示“ Good”。 对于较低的金额,结果为“差”。

=IF(B2>20000,"Good","Poor")

= IF(B2> 20000,“好”,“差”)

iffunction02

嵌套IF函数 (Nested IF Functions)

You can use more than one IF function in a formula too. Instead of just Good or Poor, you can nest a second IF in the formula, to test for a lower amount – $10,000 – and rate those results as “Average”.

您也可以在公式中使用多个IF函数。 您可以在公式中嵌套第二个IF,以测试较低的金额(10,000美元),而不仅仅是结果是“好”或“差”,并将这些结果评为“平均”。

=IF(B2>20000,"Good",IF(B2>10000,"Average","Poor"))

= IF(B2> 20000,“好”,IF(B2> 10000,“平均”,“差”))

nestedif01

观看IF订单 (Watch the IF Order)

The key to nested IF functions is to put the tests in order of difficulty.

嵌套IF函数的关键是按难易程度进行测试。

  1. In this example, 20000 is the highest amount that we’re testing for, so that test comes first.

    在此示例中, 20000是我们要测试的最高数量,因此测试首先进行。

  2. Next, we test for the lower amount, 10000, and any value that is over that amount is rated as “Average”.

    接下来,我们测试较低的数量10000 ,超过该数量的任何值将被评为“平均”。

  3. Finally, any amount that fails both tests is rated as “Poor”.

    最后,任何两项测试均未通过的金额将被评为“差”。

=IF(B2>20000,"Good",IF(B2>10000,"Average","Poor"))

= IF(B2> 20000 ,“好” , IF(B2> 10000 ,“平均” , “差” ))

在微软加拿大会议 (Meeting at Microsoft Canada)

Last week, I attended an MVP Open Day at Microsoft Canada, and enjoyed spending time with fellow Excel MVPs, Vittorio Covato, Domenic Tamburino, and Eduardo Pineiro.

上周,我参加了加拿大微软公司的MVP开放日,并享受与Excel MVP,Vittorio Covato,Domenic Tamburino和Eduardo Pineiro一起度过的时光。

They’re all formula experts, who share their Excel expertise in the online forums. “IF” you’ve asked a formula question online, there’s a good chance that they’ve helped you with a solution.

他们都是公式专家,他们在在线论坛上分享他们的Excel专业知识。 “ IF”是您在网上提出的公式问题,他们很有可能为您提供了解决方案。

In the photo below, you can see Vittorio and Domenic, who kindly allowed me to share this picture with you. Okay, I might have strong-armed them into agreeing, but I thought that you’d like to meet them too.

在下面的照片中,您可以看到Vittorio和Domenic,他们很乐意让我与您分享这张照片。 好的,我可能会武装他们达成一致,但是我认为您也想见他们。

IMG_9211

翻译自: https://contexturesblog.com/archives/2013/05/30/nesting-if-functions-in-excel/

if函数和and函数嵌套

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值