写一个excel函数,判断单元格最后两位的值,如果大于17则为5月,大于等于14则为4月,否则为3月
时间: 2023-07-16 09:13:56 浏览: 41
可以使用以下函数来实现:
```
=IF(RIGHT(A1,2)>17,"5月",IF(RIGHT(A1,2)>=14,"4月","3月"))
```
其中,A1为待判断单元格的位置,可以根据实际情况进行修改。该公式首先使用RIGHT函数获取单元格最后两位的值,然后使用IF函数进行判断。如果大于17,则返回"5月";如果大于等于14,则返回"4月";否则返回"3月"。
相关推荐
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![xlsx](https://img-home.csdnimg.cn/images/20210720083732.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![xlsx](https://img-home.csdnimg.cn/images/20210720083732.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)