mhdakhtar8
New Member
- Joined
- Feb 4, 2013
- Messages
- 36
Hi,
I've following UDF which joins cells value together with given parameter. Since I want this UDF to be available in all workbook, I want to save it as Add-in(.Xla). How can I make it work via add in? Currently it works as shown in below Table.
I've following UDF which joins cells value together with given parameter. Since I want this UDF to be available in all workbook, I want to save it as Add-in(.Xla). How can I make it work via add in? Currently it works as shown in below Table.
Code:
Public Function MultiCat( _
ByRef rRng As Excel.Range, _
Optional ByVal sDelim As String = "") _
As String
Dim rCell As Range
For Each rCell In rRng
MultiCat = MultiCat & sDelim & rCell.Text
Next rCell
MultiCat = Mid(MultiCat, Len(sDelim) + 1)
End Function
Excel 2007 | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
2 | VALUE 1 | VALUE 2 | VALUE 1, VALUE 2 | |||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D2 | =MultiCat(A2:B2,", ") |