+ Reply to Thread
Results 1 to 5 of 5

applying cross referencing between files?

Hybrid View

  1. #1
    Registered User
    Join Date
    02-08-2012
    Location
    kent, england
    MS-Off Ver
    Excel 2003
    Posts
    21

    applying cross referencing between files?

    hi, im after some help or helped to be pointed in the right direction. is it at all possible to setup something that when I input my times into my sheet it copies the selected data and puts it into a different sheet? the sheet would not be in the same file name? hope that makes sense

    many thanks
    Last edited by jafooli; 02-16-2012 at 06:33 AM. Reason: accurate title

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: is this possible to do?

    Hi

    try this code, substituting the name of your source and destination files and the sheets and addresses to copy from and to

    Sub copy_value()
    Workbooks("source.xls").Sheets("Sheet1").Range("A1").Copy Destination:=Workbooks("destination.xls").Sheets("Sheet2").Range("A2")
    End Sub

  3. #3
    Registered User
    Join Date
    02-08-2012
    Location
    kent, england
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: is this possible to do?

    Quote Originally Posted by NickyC View Post
    Hi

    try this code, substituting the name of your source and destination files and the sheets and addresses to copy from and to

    Sub copy_value()
    Workbooks("source.xls").Sheets("Sheet1").Range("A1").Copy Destination:=Workbooks("destination.xls").Sheets("Sheet2").Range("A2")
    End Sub
    ok thanks NickyC. Where do I put the above code in?... sorry if this is a dumb question. ive got both spreadsheets open side by side. thanks for your help

  4. #4
    Registered User
    Join Date
    02-08-2012
    Location
    kent, england
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: is this possible to do?

    can anyone else have some input please? cant quite figure out where excatly this code goes. im such a noob

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: applying cross referencing between files?

    The code would go in a regular vba module: http://www.contextures.com/xlvba01.html

    You can then easily run the code by clicking a button from the Forms toolbar.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

+ 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