当前具有以下代码,输出将为~ abc~ etc~ etc~
。如何删除第一个〜。因此,它应该立即以 abc 开头,而不是〜。
Function SpecialLookup(lookup_value As String, src_rng As Range, column_index As Long)
Dim rng As Range
Dim xResult As String
xResult = ""
For Each rng In src_rng
If rng = lookup_value Then
xResult = xResult & "~ " & rng.Offset(0, column_index - 1).Value
End If
Next
SpecialLookup = xResult
End Function
最佳答案
Mid
应该可以解决问题
SpecialLookup = Mid(xResult, 3, Len(xResult))
关于excel - 删除第一个concat为空字符串,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/61390565/