I assume 4 months was representative and not definitive since none of your
sample data fits that pattern. So I will assume that if the leftmost row is
zero and the rightmost is > 0 then copy the row.
Sub CopyData()
Dim rw as Long, cell as Long
Dim rng as Range
With Worksheets("Sheet1")
set rng = .Range(.Range("A2"),.Range("A2").End(xldown))
End With
rw = 2
for each cell in rng
if cell.Value = 0 and cell.offset(0,7).Value > 0 then
cell.Resize(1,8).copy Destination:=Worksheets("Sheet2") _
.cells(rw,1)
rw = rw + 1
end if
Next
End Sub

Signature
Regards,
Tom Ogilvy
> Hi,
> all
[quoted text clipped - 50 lines]
>
> Thanks a lot
Lolly - 28 Feb 2006 04:09 GMT
hi,
Tom
thanks a lot
I tried to run the macro but nothing happens
Actually
My first column and row contains some text
e.g
Jun Jul AUg Sep
test 0 0 0 2
ted 0 0 0 2
tid 0 0 0 0
I need to copy test and ted and not tid.
Am I clear now. Could you please help me further?
Thanks a lot

Signature
Kittie
> I assume 4 months was representative and not definitive since none of your
> sample data fits that pattern. So I will assume that if the leftmost row is
[quoted text clipped - 71 lines]
> >
> > Thanks a lot
Tom Ogilvy - 28 Feb 2006 13:19 GMT
Sub CopyData()
Dim rw as Long, cell as Long
Dim rng as Range
With Worksheets("Sheet1")
set rng = .Range(.Range("A2"),.Range("A2").End(xldown))
End With
rw = 2
for each cell in rng
' the 8 below is just a guess from your first sample. there is now
' no reason to believe that actually has any resemblance to your
' true data, so you will have to make you own adjustments
if cell.offset(0,1).Value = 0 and cell.offset(0,8).Value > 0 then
cell.Resize(1,9).copy Destination:=Worksheets("Sheet2") _
.cells(rw,1)
rw = rw + 1
end if
Next
End Sub

Signature
Regards,
Tom Ogilvy
> hi,
> Tom
[quoted text clipped - 92 lines]
> > >
> > > Thanks a lot