View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Copy Rows if Cell F? contains

Dim rng as Range
Dim rw as Long
Dim cell as Range
set rng = range(cells(2,6),cells(rows.count,6).End(xlup))
rw = 2
for each cell in rng
if instr(1,cell,"myString",vbTextCompare) then
Cells(cell.row,1).Resize(1,16).copy _
Destination:=Worksheets("Sheet2").Cells(rw,1)
rw = rw + 1
end if
Next

--
Regards,
Tom Ogilvy

"Hal" wrote in message
...
My sheet has 200+ rows of data in columns A - P. I want to search the text

in
column F cells for 'myString' and copy those rows in another worksheet,

same
workbook. Row A is a header row.

Your assistance is greatly appreciated as always.

Hal