在Excel中利用if函数可以设置一个数字小于0就显示0,大于就显示实际的数字,具体操作请参照以下步骤。
1、首先在电脑上打开一个Excel文件,然后在编辑区中输入两组数据。
![](https://iknow-pic.cdn.bcebos.com/d52a2834349b033b7070d56d1bce36d3d439bd88?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
2、那么需要计算A列与B列的差值,然后在C列中显示。用鼠标选中C1表格。
![](https://iknow-pic.cdn.bcebos.com/43a7d933c895d1436d18cc947df082025aaf071e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
3、然后就输入函数公式【=if(A1-B1<=0,0,A1-B1)】。
![](https://iknow-pic.cdn.bcebos.com/8435e5dde71190ef2931ba68c01b9d16fcfa60ba?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
4、然后点击回车键就会出现结果,因为1-2<0,所有会显示0。
![](https://iknow-pic.cdn.bcebos.com/10dfa9ec8a1363279d5fe9849f8fa0ec09fac7d3?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
5、然后用鼠标拉住往下拉,就会得出整组数据的结果。完成以上设置后,即可在EXCEL中设置一个数字小于0就显示0,大于就显示实际的数字。
![](https://iknow-pic.cdn.bcebos.com/4afbfbedab64034fb10ce9b1a1c379310b551d47?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)