View Full Version : Copy range by condition
jmaocubo
05-24-2010, 12:24 PM
Hello
I have a table that has a column with values equal to zero and values greater than zero.
How do I copy only the values greater than zero for another column?
Thanks in advance
mdmackillop
05-24-2010, 01:35 PM
Look at Advanced Filter in Excel Help.
jmaocubo
05-25-2010, 03:19 AM
Look at Advanced Filter in Excel Help.
Hi mdmackillop
Thanks for the tip :thumb
I tried like this:
With Range("N53:N99")
.AutoFilter Field:=1, Criteria1:=">0"
.Copy Destination:=Folha21.Range("F53")
.AutoFilter
End With
With Range("O53:O99")
.AutoFilter Field:=1, Criteria1:=">0"
.Copy Destination:=Folha21.Range("D53")
.AutoFilter
End With
With Range("M53:M99")
.AutoFilter Field:=1, Criteria1:=">0"
.Copy Destination:=Folha21.Range("A53")
.AutoFilter
End With
But it crash in the second with.... Can you help me?
Thanks again
mbarron
05-25-2010, 06:17 AM
What was the error on the second one? Is there no data that satisfies the filter?
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.