On 2002-09-03 12:32, keith wrote:
I need a macro to select and copy a range (or otherwise define a range) in a single column of a list excluding hidden rows. I can't manually define the Cells because the hidden rows change based on filters. So AFTER the list is filtered it hides a bunch of rows based on the criteria of the filter. I need to copy say the 1st 10 VISIBLE cells in column "C" after the filter. Let me know if I can clarify more.. thanks in advance
Is the range you need just the 1 Column in width, or does this problem expand?
if it is in Column C and you had C1:C1000 as the range (unfiltered 1000rows below the field name).
Then you can just use the range, i.e.
Sub CopyFilter()
Range("C1:C1000").Copy
Sheets(2).Select
Range("a1").PasteSpecial Operation:=xlPasteSpecialOperationNone
End Sub
will copy the range visable to to sheet2 a1 and down,
as copying the range (inc. the hidden rows) will just copy the visable cells.