close

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

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()