Change this part...
'---
For Each cell In DataRng
If Not cell.EntireRow.Hidden Then '<<<
strRow = strRow & cell.Value & ","
End If '<<<
Next cell
'---
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(Extras for Excel add-in)
<(E-Mail Removed)>
wrote in message
news:370740.8.1322040592042.JavaMail.geo-discussion-forums@vbbdd1...
> Hi all!
>
> I need to combine several row values into one cell. In an older thread I found the macro below:
>
> Sub ReallyBigRow()
> ''take a column of cells and put all into one big row separated by commas
> ''originally posted by John Wilson
> Dim Lastrow As Long
> Dim cell As Range
> Dim DataRng As Range
> Dim strRow As String
> Lastrow = Cells(Rows.Count, "A").End(xlUp).Row
> Set DataRng = Range("A1:A" & Lastrow)
> For Each cell In DataRng
> strRow = strRow & cell.Value & ","
> Next cell
> Range("B1").Value = strRow
> End Sub
>
> This works fine for complete rows (ex. A1:A25). However I would need the same function for a row
> with active filter (ex. A1,A3,A22,A24 visible).
>
> Any idea someone how I could achieve that?
>
> Thanks