View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Copy entire row if...

change position of end with and end if

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...
then change to this idea

With workbooks"table2.xls").worksheets("sheet1")
If Cells(2,"B") = "text1" Then
x = .Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(2, "b").EntireRow.Copy .Cells(x, 1)
End With
end if
End Sub

If Cells(2,"B") = "text1" Then
Cells(2,"B").Entirerow.Copy
Destination:=Workbooks("table2.xls").Worksheets("S heet1").Range("A1")
End If


--
Don Guillett
SalesAid Software

"Sam" wrote in message
...
Thanks Bob, that was very helpful. There is still one more detail I want

to
solve. I want to be able to put more than one row in destination table,

so
that the data is saved always to next empty row. Because of this I can't
order the certain range.