I have a spreadsheet which each day will have a lot of hidden rows (different rows each day). I want to be able to copy the first ten row of the visible data only and paste it to another spreadsheet, when I currently try to do this with the code below the paste does the first 10 rows including the hidden rows...I thought SpecialCells(xlCellTypeVisible) would help only copy the visible rows, but I was wrong.
Rows("17:3000").Select
Selection.Sort Key1:=Range("v16"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Limit = 10
Idx = 1
Set myRange4 = Range("b17:b3000").SpecialCells(xlCellTypeVisible)
For Each myArea In myRange4.Areas
For Each rw In myArea.Rows
If Idx <= Limit Then
strFltrdRng4 = strFltrdRn4g & rw.Address & ","
Idx = Idx + 1
End If
Next
Next
strFltrdRng4 = Left(strFltrdRng, Len(strFltrdRng) - 1)
Set myFltrdRange4 = Range(strFltrdRng4)
myFltrdRange4.Copy
Rows("17:3000").Select
Selection.Sort Key1:=Range("v16"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Limit = 10
Idx = 1
Set myRange4 = Range("b17:b3000").SpecialCells(xlCellTypeVisible)
For Each myArea In myRange4.Areas
For Each rw In myArea.Rows
If Idx <= Limit Then
strFltrdRng4 = strFltrdRn4g & rw.Address & ","
Idx = Idx + 1
End If
Next
Next
strFltrdRng4 = Left(strFltrdRng, Len(strFltrdRng) - 1)
Set myFltrdRange4 = Range(strFltrdRng4)
myFltrdRange4.Copy