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

For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row
If Cells(i,"C").Value = "K" Then
iRow = iRow + 1
Rows(i).Copy Worksheets("Sheet2").Rows(iRow)
End If
Next i

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Micos3" wrote in message
...
Hi,
I have a db that i want to to extract some lines to other sheet when a

word
is typed. I give example in below. When "K" is typed i Want that line

1,4,5
to be extracted to other sheet by order. How do i do this?
A B C
1 Day K
2 Day W
3 Day Y
4 Day K
5 Day K
6 Day Y