excl表格操作IP地址排序
1、A1列输入所有IP地址;
2、按 Alt + F11键 启用键 Microsoft Visual Basic应用程序 窗口中,单击 插页 > 模块 创建一个新模块。 看截图;
3、在里面 模块 脚本,将下面的代码粘贴到该脚本,然后保存代码并关闭VBA窗口;
Function IP(Txt As String) As String
'UpdatebyExtendoffice20170725
Dim xList As Variant
Dim I As Long
xList = Split(Txt, ".")
For I = LBound(xList) To UBound(xList)
xList(I) = Format(xList(I), "000")
Next
IP = Join(xList, ".")
End Function