Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel and VBA.
There are two books. As from one book to execute search of a free line in the
second books. And how to transfer the data in the second book? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel and VBA.
Place in a code module in Book1.xls
Sub CopyToBook1() Dim rng as Range Dim rng1 as Range set rng = Workbooks("Book2.xls") _ .WorkSheets("Sheet1").Range("A1:A500") set rng1 = rng.Find("ABC") if not rng1 is nothing then rng1.EntireRow.copy Destination:= _ workbooks("Book1.xls").Worksheets("Sheet1") _ .Cells(rows.count,1).End(xlup)(2) Else msgbox "ABC not found" End if End Sub -- Regards, Tom Ogilvy "SdbX" wrote in message ... There are two books. As from one book to execute search of a free line in the second books. And how to transfer the data in the second book? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|