excel公式将ip格式转换

数字转标准格式:

=INT(A1/256^3)&”.”&INT(MOD(A1,256^3)/256^2)&”.”&INT(MOD(MOD(A1,256^3),256^2)/256)&”.”&MOD(A1,256)

标准格式转数字:

=LEFT(a1,FIND(“.”,a1)-1)*256^3+mid(a1,FIND(“.”,a1)+1,FIND(“.”,a1,FIND(“.”,a1)+1)-FIND(“.”,a1)-1)*256^2+mid(a1,FIND(“.”,a1,FIND(“.”,a1)+1)+1,FIND(“.”,a1,FIND(“.”,a1,FIND(“.”,a1)+1)+1)-FIND(“.”,a1,FIND(“.”,a1)+1)-1)*256+right(a1,len(a1)-FIND(“.”,a1,FIND(“.”,a1,FIND(“.”,a1)+1)+1))

    原文作者:不会code的coder
    原文地址: https://blog.csdn.net/qq_36746327/article/details/83986896
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞