Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
GP GP is offline
external usenet poster
 
Posts: 11
Default Copying data to worksheets in another workbook that will change

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.
--
gp
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying data to worksheets in another workbook that will change

With ActiveWorkbook.Worksheets("GP)
.Range("D44").Copy Destination:= _
Worksheets("Freight.xls").Worksheets(.Range("D41") .Value) _
.Cells(rows.count,1).End(xlup)(2)
End With

--
Regards,
Tom Ogilvy


"gp" wrote in message
...
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.
--
gp



  #3   Report Post  
Posted to microsoft.public.excel.programming
GP GP is offline
external usenet poster
 
Posts: 11
Default Copying data to worksheets in another workbook that will chang

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
--
gp


"Tom Ogilvy" wrote:

With ActiveWorkbook.Worksheets("GP)
.Range("D44").Copy Destination:= _
Worksheets("Freight.xls").Worksheets(.Range("D41") .Value) _
.Cells(rows.count,1).End(xlup)(2)
End With

--
Regards,
Tom Ogilvy


"gp" wrote in message
...
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.
--
gp




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copying data to different worksheets in the same workbook Veronica Johnson Excel Worksheet Functions 1 January 9th 08 12:09 AM
copying worksheets in a workbook limit? Gary Excel Worksheet Functions 1 September 27th 06 09:41 PM
Copying worksheets to a new workbook csimont Excel Discussion (Misc queries) 4 February 8th 06 08:44 PM
Copying Worksheets from 1 Workbook to another cwieman Excel Programming 4 November 20th 03 01:12 PM
Copying worksheets to a new workbook John Turton[_3_] Excel Programming 2 August 29th 03 05:56 PM


All times are GMT +1. The time now is 11:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"