'Find the listNum of a Custom List based on all items Dim listNumFound As Integer listNumFound = Application.GetCustomListNum(Array("Element1", "Element2", "Element3")) 'Find a Custom List which contains a specific element Dim i As Integer Dim arrayItem As Variant Dim customListContents() As Variant Dim listNumFound As Integer For i = 1 To Application.CustomListCount 'Set the CustomList array to a variable customListContents = Application.GetCustomListContents(i) 'Loop through each element in the CustomList For Each arrayItem In customListContents 'Test if the element has a specific value If arrayItem = "Element1" Then listNumFound=i Next arrayItem Next i
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter