答案 0 :(得分:0)
此代码帮助您遍历所有值并找到下拉值的最大值。看截图。根据您的需要进行修改。
Sub AddHighPlusOne()
Dim cb As ComboBox
Set cb = ActiveSheet.ComboBox22
maxValue = 0
For i = 1 To cb.ListCount - 1
'Looking at your scrren shot i see that, number is in middle, so i used Mid here.
'Please change the values as per your need
If (CInt(Mid(cb.List(i), 6, 1)) > maxValue) Then
maxValue = CInt(Mid(cb.List(i), 6, 1))
End If
Next
'maxValue will be the highest value
'cb.AddItems("UrPrefix" & maxValue & "Ur Suffix ")
End Sub