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

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
 
原文地址:https://www.cnblogs.com/fengju/p/6336305.html