I am creating a function to concatenate all cells in a range in a single cell. Everything works ok with the function.
Function transposerange(Rg As Range)
Dim xCell As Range
Dim xStr As String
For Each xCell In Rg
If Not IsEmpty(xCell.Value) Then
xStr = xStr & xCell.Value & " "
End If
Next
transposerange = Left(xStr, Len(xStr) - 1)
End Function
If I save it in the opened workbook, I can call it from excel. If I save this function to my personal workbook, it doesn't appear in excel when I want to call it.
What am I doing wrong?