View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Extract lines with VBA?

Should be

Sub myData()
For i = 2 To Cells(Rows.Count,"A").End(xlUp).Row
If Cells(i,"C").Value = Range("A1").Value Then
iRow = iRow + 1
Cells(i,"C").Resize(,10).Copy Worksheets("Sheet2").Range("A" &
iRow)
End If
Next i
End Sub

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Micos3" wrote in message
...
Isn't working, i don't know why, but i'll gonna try with a new db and

macro
now with 3 sheet, after lunch.
Other thing, Is it possible to choose not the whole line but some just

some
columns?
Thanks again