Copying data to worksheets in another workbook that will change

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to create a macro that will copy data from one worksheet to another
worksheet in another workbook. In workbook "A" I have a worksheet named "GP"
with data in cells d41 and d44. I want the macro to copy the value in cell
d44, go to another workbook named "Freight", find the worsheet named the same
as the value in cell d41, go to the first empty row in column A, then paste
the value in that cell.
 
With ActiveWorkbook.Worksheets("GP)
.Range("D44").Copy Destination:= _
Worksheets("Freight.xls").Worksheets(.Range("D41").Value) _
.Cells(rows.count,1).End(xlup)(2)
End With
 
Tom:
I really appreciate your help, but unfortunately I wasn't able to get it to
work. I'm a novice at code. I really only know how to record macros. Is there
a similar solution which would begin with "Sub" and end with "End Sub" that I
could then initiate with a command button?

Best regards,
Greg
 
Back
Top