我自己的一个需求是,将我在excel中格式为
0.13422319(0.29373067) 0.25659165(0.44515750)+ 0.31426764(0.46226351)- 0.118714(0.055252)=
这样的单元格,我想把这些小数全部格式化成保留4为小数,如变成:
0.1342(0.2937) 0.2566(0.4452)+ 0.3143(0.4623)+ 0.1187(0.0553)=
格式化函数:
=TEXT(LEFT(A1,FIND("(",A1)-1),"0.0000")&"("&TEXT(MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1),"0.0000")&")"&IF(RIGHT(C4,1)="+","+",IF(RIGHT(C4,1)="-","-",IF(RIGHT(C4,1)="=","=","")))
搞定,亲测好用!