多级编号的公式,复制粘贴会自动更新

把相应的公式复制粘贴即可实现;

a1=IF(ISERROR(VALUE(SUBSTITUTE(Sheet1!prevWBS,".",""))),"1",IF(ISERROR(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",1))),TEXT(VALUE(Sheet1!prevWBS)+1,"#"),TEXT(VALUE(LEFT(Sheet1!prevWBS,FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",1))-1))+1,"#")))

a2=IF(ISERROR(VALUE(SUBSTITUTE(Sheet1!prevWBS,".",""))),"0.1",IF(ISERROR(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",1))),Sheet1!prevWBS&".1",LEFT(Sheet1!prevWBS,FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",1)))&IF(ISERROR(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",2))),VALUE(RIGHT(Sheet1!prevWBS,LEN(Sheet1!prevWBS)-FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",1))))+1,VALUE(MID(Sheet1!prevWBS,FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",1))+1,(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",2))-FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",1))-1)))+1)))

a3=IF(ISERROR(VALUE(SUBSTITUTE(Sheet1!prevWBS,".",""))),"0.0.1",IF(ISERROR(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",2))),Sheet1!prevWBS&".1",LEFT(Sheet1!prevWBS,FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",2)))&IF(ISERROR(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",3))),VALUE(RIGHT(Sheet1!prevWBS,LEN(Sheet1!prevWBS)-FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",2))))+1,VALUE(MID(Sheet1!prevWBS,FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",2))+1,(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",3))-FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",2))-1)))+1)))

a4=IF(ISERROR(VALUE(SUBSTITUTE(Sheet1!prevWBS,".",""))),"0.0.0.1",IF(ISERROR(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",3))),Sheet1!prevWBS&".1",LEFT(Sheet1!prevWBS,FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",3)))&IF(ISERROR(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",4))),VALUE(RIGHT(Sheet1!prevWBS,LEN(Sheet1!prevWBS)-FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",3))))+1,VALUE(MID(Sheet1!prevWBS,FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",3))+1,(FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",4))-FIND("`",SUBSTITUTE(Sheet1!prevWBS,".","`",3))-1)))+1)))

广东省
浏览 1083
收藏
2
分享
2 +1
5
+1
全部评论 5
 
张俊
张俊

WPS函数专家

新路兄厉害了,这公式太长了,一般人难以理解!
· 上海
回复
多乐君
定义到名称管理器就很方便了,不用理解会用就行
· 广东省
1
回复
 
wps新路
wps新路

WPS函数专家

虽然没看懂,不过也留个言吧。=INT(ROW(A4)/4)&REPT(".1",MOD(ROW(A4),4))---------=--(INT(ROW(A6)/6)&"."&MOD(ROW(A6),6))《(6个一组)》
· 重庆
1
回复
 
好家伙
我的天这公式,看着就想辞职
· 云南省
回复