How do I Create a Macro that will copy the rows that have a value lt;gt; 0 and
paste them on anther worksheet
Try something like the following. Change the lines marked with lt;lt;
to the appropriate ranges.
Dim DestRng As Range
Dim Rng As Range
Set DestRng = Worksheets(quot;Sheet2quot;).Range(quot;A1quot;) 'lt;lt;
For Each Rng In Range(quot;A1:A10quot;) 'lt;lt;
If Rng.Value lt;gt; quot;quot; Then
Rng.EntireRow.Copy Destination:=DestRng
Set DestRng = DestRng(2, 1)
End If
Next Rng--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.comquot;wil4dquot; gt; wrote in message
...
gt; How do I Create a Macro that will copy the rows that have a
gt; value lt;gt; 0 and
gt; paste them on anther worksheet
- Sep 10 Mon 2007 20:39
Create a Macro that will copy the rows that have a value lt;gt; 0
close
全站熱搜
留言列表
發表留言