Hi gals and guys,
here is my problem:
ConcatenateRange Function:
I would like to get ALL visible rows (containing values) after applying a filter, not only the row A4.
I have tried the following code, but this only output the A4 or more exactly, the rows until the hidden ones.
How could I get all those filtered rows (A4,A6,etc.)?
Thank you in advance.
Regards,
blueeye
here is my problem:
ConcatenateRange Function:
Code:
Function ConcatenateRange(ByVal cell_range As Range, _ Optional ByVal seperator As String) As String
Dim cell As Range
Dim newString As String
Dim cellArray As Variant
Dim i As Long, j As Long
cellArray = cell_range.Value
For i = 1 To UBound(cellArray, 1)
For j = 1 To UBound(cellArray, 2)
If Len(cellArray(i, j)) <> 0 Then
newString = newString & (seperator & cellArray(i, j))
End If
Next
Next
If Len(newString) <> 0 Then
newString = Right$(newString, (Len(newString) - Len(seperator)))
End If
ConcatenateRange = newString
End Function
I would like to get ALL visible rows (containing values) after applying a filter, not only the row A4.
I have tried the following code, but this only output the A4 or more exactly, the rows until the hidden ones.
Code:
AllVisibleRows = ConcatenateRange(Range("A4:A65536").SpecialCells(xlCellTypeVisible))
How could I get all those filtered rows (A4,A6,etc.)?
Thank you in advance.
Regards,
blueeye