Thread
:
Search then copy and past data
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Search then copy and past data
try this
Do
c.entirerow.copy workbooks("test1.xls").sheets("sheet1").range("A2" )
--
Don Guillett
SalesAid Software
"joecrabtree" wrote in message
s.com...
To all,
I have taken this code from the MS VBA Help File. How can I modify it
so that instead of changing the pattern of the cell, it instead copys
the entire row that the cell is in, and pastes it into another workbook
called test1.xls, sheet1, cell A2?
Thanks in advance,
Joseph Crabtree
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Interior.Pattern = xlPatternGray50
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett