+ Reply to Thread
Results 1 to 3 of 3

Copying data to worksheets in another workbook that will change

  1. #1
    gp
    Guest

    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. #2
    Tom Ogilvy
    Guest

    Re: 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" <gp@discussions.microsoft.com> wrote in message
    news:BD1A9384-A0F1-4154-B14F-DAAA161BA13C@microsoft.com...
    > 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. #3
    gp
    Guest

    Re: 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" <gp@discussions.microsoft.com> wrote in message
    > news:BD1A9384-A0F1-4154-B14F-DAAA161BA13C@microsoft.com...
    > > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1