View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Filtered rows not in code???

without seing your data, I think you want to copy all at once instead of
one a time???
range("a2:x30").).SpecialCells(xlCellTypeVisible). copy range("aa1")


--
Don Guillett
SalesAid Software

"John" wrote in message
...
Thanks for the reply... something like this???
If cp.Range("a" & rw1 + i).SpecialCells(xlCellTypeVisible) = False Then
GoTo next1:
Else

this doesn't quite work
"Don Guillett" wrote:

look in the vba help index for special cells visible

--
Don Guillett
SalesAid Software

"John" wrote in message
...
I have a spreadsheet with thousands of rows that I frequently filter
(autofilter). I then have some code that I would like to run just on
the
filtered(showing) rows that I am selecting... meaning if I have rows
2-10
selected but only rows 2 and 5 are showing due to my filter... how do I
perform my code just on those two rows???

I was trying...
If Selection.Rows.Count 1 Then

For i = 0 To Selection.Rows.Count - 1 Step 1
but this would perform the operation on all the rows (i.e. 2-10)

any thoughts?