Apparently you have to buy a ticket if you want to win the lottery, so I'm out of luck. However, if you're in an office lottery pool, or buy your own tickets for the lottery, Excel can let you know if you have a winning ticket.
显然,如果您想中彩票,就必须买票,所以我很不走运。 但是,如果您在办公室彩票池中,或购买自己的彩票,Excel会告知您是否有中奖彩票。
Excel知道您是否中了彩票 (Excel Knows If You Won the Lottery)
Yes, Excel knows if you won the lottery -- it just takes a bit of conditional formatting, and the COUNTIF function.
是的,Excel知道您是否中了彩票-它只需要一点条件格式设置和COUNTIF函数 。
![CondFormatLottery00 CondFormatLottery00](https://i-blog.csdnimg.cn/blog_migrate/610535f8f8fa2e458cbd9a433f7b277d.png)
You could use this technique to highlight other things too, based on a list of items to check. For example, you could create a list of bad accounts or obsolete products, and highlight those on an Excel worksheet with product order requests.
您还可以根据要检查的项目列表,使用此技术来突出显示其他内容。 例如,您可以创建不良帐户或过时产品的列表,并在带有产品订单请求的Excel工作表中突出显示这些帐户。
突出彩票号码 (Highlight Lottery Numbers)
In this example the ticket numbers are in cells B2:G4, and the winning numbers drawn for the current lottery are entered in cells B6:G6. Follow these steps to highlight the winning numbers in the list of tickets:
在该示例中,票号在单元格B2:G4中,并且为当前彩票绘制的中奖号码输入在单元格B6:G6中。 请按照以下步骤在票证列表中突出显示中奖号码:
- Select the cells were the conditional formatting will be applied, B2:G4 选择要应用条件格式的单元格,B2:G4
- On the Excel Ribbon's Home tab, click Conditional Formatting 在“ Excel功能区”的“主页”选项卡上,单击“条件格式”
- Click New Rule 点击新规则
In the New Formatting Rule window, click Use a Formula to determine which cells to format
在“新格式设置规则”窗口中,单击“ 使用公式来确定要格式化的单元格”
For the formula, use the COUNTIF function, and refer to the active cell:
对于公式,请使用COUNTIF函数,并引用活动单元格:
=COUNTIF($B$6:$G$6,B2)
= COUNTIF($ B $ 6:$ G $ 6,B2)
- Click the Format button. 单击格式按钮。
- Select the formatting options that you want (blue fill colour, in this example), then click OK. 选择所需的格式设置选项(在本例中为蓝色),然后单击“确定”。
- Click OK 点击确定
![CondFormatLottery01 CondFormatLottery01](https://i-blog.csdnimg.cn/blog_migrate/07db8e0d1cecb982a62e477a06abd370.png)
中奖号码突出显示 (Winning Numbers Are Highlighted)
After you click OK, to apply the condtional formatting, the cells with winning numbers are highlighted in blue, and other cells have no fill colour.
单击确定后,要应用常规格式,带有中奖号码的单元格将突出显示为蓝色,而其他单元格则没有填充色。
There are more examples of Excel conditional formatting on my main Contextures website.
我的主要Contextures网站上有更多Excel条件格式的示例 。
![CondFormatLottery00 CondFormatLottery00](https://i-blog.csdnimg.cn/blog_migrate/610535f8f8fa2e458cbd9a433f7b277d.png)
观看视频 (Watch the Video)
To see the steps for highlighting the winning lottery numbers with Excel conditional formatting, watch this short Excel tutorial video. There's no guarantee that this will improve your odds of winning, but at least you'll know if you do!
要查看使用Excel条件格式突出显示中奖彩票号码的步骤,请观看这段简短的Excel教程视频。 不能保证这会增加您获胜的几率,但至少您会知道您是否会获胜!
翻译自: https://contexturesblog.com/archives/2010/09/24/excel-knows-if-you-won-the-lottery/