What is the best way to convert a range of cells to a string?
I have a function that only takes a string as input so I need to convert the range to a string, while retaining
You can use the following solution to convert a range to a string in VBA:
Sub convert()
Dim rng As Range, cell As Range
Dim filter As String
filter = ""
Set rng = Selection
For Each cell In rng
If Not cell Is Nothing Then
filter = """" & cell & """" & "," & filter
End If
Next cell
End Sub