Says You've entered too many arguments for this function.
Any way around that?
Says You've entered too many arguments for this function.
Any way around that?
Excel Workbook | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | NR | Aaa | AAA | Aaa/AAA | ||
Sheet1 |
Function Combine_NR(r As Range, Optional d As String)
Application.Volatile
Dim x As Range
Dim s As String
For Each x In r
If x <> "NR" Then
s = s & x
If d <> "" Then s = s & d
End If
Next x
If d <> "" Then
Combine_NR = Left(s, Len(s) - 1)
Else: Combine_NR = s
End If
End Function