excel函数将月份转化为季度时,想将数字1/2⼀3⼀4转化为一/二/三/四,下列公式哪里错了

2024-12-04 06:22:32
推荐回答(1个)
回答1:

其一,函数中符号全部为英文半角

其二,分号改为逗号,if函数语法结构如下(三个参数之间用逗号)

=IF(logical_test,value_if_true,value_if_false)

根据题主意思是将【1234】分别转换为【一二三四】,其实还可以进一步优化一下公式(代码简、短),建议用公式如下:

=CHOOSE(INT((MONTH(B7)+2)/3),"一","二","三","四")

=CHOOSE(ROUNDUP(MONTH(B7)/3,0),"一","二","三","四")

=CHOOSE(CEILING(MONTH(B7)/3,1),"一","二","三","四")