使用日期函数缩短IF和公式

时间:2016-06-19 10:35:44

标签: excel excel-formula

以下是我使用日期的IF和公式。

=if(and(C4>= & DATE(2016,01,01),C4<= & 
DATE(2016,01,31)),"Jan",if(and(C4>= & DATE(2016,02,01),C4<= & 
DATE(2016,02,29)),"Feb",if(and(C4>= & DATE(2016,03,01),C4<= & 
DATE(2016,03,31)),"Mar",if(and(C4>= & DATE(2016,04,01),C4<= & 
DATE(2016,04,30)),"Apr",if(and(C4>= & DATE(2016,05,01),C4<= & 
DATE(2016,05,31)),"May",if(and(C4>= & DATE(2016,06,01),C4<= & 
DATE(2016,06,31)),"Jun",if(and(C4>= & DATE(2016,07,01),C4<= & 
DATE(2016,07,31)),"Jul",if(and(C4>= & DATE(2016,08,01),C4<= & 
DATE(2016,08,31)),"Aug",if(and(C4>= & DATE(2016,09,01),C4<= & 
DATE(2016,09,30)),"Sept",if(and(C4>= & DATE(2016,10,01),C4<= & 
DATE(2016,10,31)),"Oct",if(and(C4>= & DATE(2016,11,01),C4<= & 
DATE(2016,11,30)),"Nov",if(and(C4>= & DATE(2016,12,01),C4<= & 
DATE(2016,12,31)),"Dec",0))))))

请帮我缩短这个公式。

感谢。 萨勒曼汗

1 个答案:

答案 0 :(得分:1)

我希望,以下公式将解决您的问题

= TEXT(c4,&#34; mmm&#34;)