RangeValues

Returns values of all cells in range into 1 string
Only non-blank values separated by Sepa

CodeFunctionName
What is this?

Public

Tested

Original Work
Function RangeValues(RangeAddress, Optional Shee = "Active", Optional WB = "This", Optional Sepa = "|")
    ' Returns values of all cells in range into 1 string
    '    Only non-blank values separated by Sepa
    '
    If Wb = "This" Then Wb = ThisWorkbook.Name
    If Wb = "Active" Then Wb = ActiveWorkbook.Name
    If Shee = "Active" Then Shee = ActiveSheet.Name
    Rett = ""
    For Each Cee in Workbooks(WB).Worksheets(Shee).Range(RangeAddress)
        If Cee.Value > "" Then
            Rett = Rett & IIF(Rett > "", Sepa, "") & Cee.Value
        End If
    Next
    RangeValues = Rett
End Function

RangeAddress, Optional Shee = "Active", Optional WB = "This", Optional Sepa = "|"

Views 166

Downloads 81

CodeID
DB ID