简体   繁体   English

根据Excel中的另一个单元格自动填充单元格数据

[英]Autofill a cell data based on another cell in Excel

Is there a way to auto fill a cell in an excel sheet based on a data entry in another cell? 有没有一种方法可以基于另一个单元格中的数据输入来自动填充Excel工作表中的单元格? Here is what I want to do: Suppose I have two columns in my sheet (A,B) . 这是我想做的事情:假设我的工作表(A,B)有两列。 I want the column B to show data based on a data range in the column A , for example if the value entered is between 0 and 20 I want to the column B to show Bad , and if the value entered is between 21 and 60 I want B to show OK etc. How can I do that? 我希望B列显示基于A列中数据范围的数据,例如,如果输入的值介于0到20之间,我希望B列显示Bad ,并且输入的值介于21和60之间想要B显示OK等。我该怎么做?

I am using Excel 2013. Thanks 我正在使用Excel2013。谢谢

=IF(A1<20;"Bad";IF(AND(20<A1;A1<60);"Ok"))

将此公式放在单元格B1中,只需将其复制并粘贴到B列中的其他单元格上即可实现此公式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM