View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default macro - ignore row

Try the below macro which copy the range to Sheet2 ignoring the rows which
start with "zzzz" in Column B.

Sub Macro()
Dim lngRow As Long
For Each cell In Range("B2:J150").Rows
If Not cell.Cells(1).Text Like "zzzz*" Then
lngRow = lngRow + 1
cell.Copy Sheets("Sheet2").Range("A" & lngRow)
End If
Next
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"puiuluipui" wrote:

Hi, i have a macro that copy a range (B2:J150)...and i need the macro to
ignore row that begin with "zzzz". I need macro to copy everything in range,
except the row that begin with "zzzz".
I only need this part of the code.
Can this be done?
Thanks!