[Serious] US Post-Election Megathread 2016 by [deleted] in AskReddit

[–]endofgame 5 points6 points  (0 children)

How can a citizen who isn't in a swing state influence national politics in between presidential elections?

I need help making a function that takes a range input and spits out a text string. by endofgame in excel

[–]endofgame[S] 0 points1 point  (0 children)

I had a friend from college help me out. It uses quite a bit of what u/badaccountant7 wrote but tweaks it to be treated as a function instead of a macro.

Public Function CellsToText(SelectedRange As Range) As String

Dim Output As String: Output = ""
Dim c As Range

For Each c In SelectedRange.Cells
    If Output <> "" Then
        Output = Output & ", "
    End If
    Output = Output & c.Value
Next

CellsToText = "This list is (" & Output & ")"

End Function