EXCEL 中 判断某个自定义序列是否存在

来源:互联网 发布:秃鹰气步枪数据分解图 编辑:程序博客网 时间:2024/04/24 11:51
Sub Macro1()
Dim customlist As String, i As Long
customlist = "全部自定义序列" & vbCrLf & String(30, "-") & vbCrLf
For i = 1 To Application.CustomListCount
customlist = customlist & "【" & Format(i, "00") & "】" & Join(Application.GetCustomListContents(i), ",") & vbCrLf
Next
MsgBox customlist & vbCrLf & String(30, "-") & vbCrLf & "序列(xxxxx)有没有?-->" & IIf(InStr(customlist, "xxxxx") > 0, "有!", "没有!")
End Sub
 
原创粉丝点击