A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi Hafeezur,
Considerably preferable to my earlier suggestion would be:
'=========>>
Public Function ConcatQuotes(ParamArray rng()) As Variant
Dim arr() As Variant
Dim rArea As Variant, rCell As Range
Dim i As Long, j As Long
ConcatQuotes = CVErr(xlErrNA)
For Each rArea In rng
For Each rCell In rArea.Cells
If Not rCell.Value = vbNullString Then
i = i + 1
ReDim Preserve arr(1 To i)
arr(i) = "'" & rCell.Value & "'"
End If
Next rCell
Next rArea
If CBool(i) Then
ConcatQuotes = Join(arr, ",")
End If
End Function
'<<========
===
Regards,
Norman