Results 1 to 3 of 3

Thread: How to insert common data from on Excel File to another

  1. #1
    Join Date
    Jan 2012
    Posts
    59

    How to insert common data from on Excel File to another

    Is there any way to insert data from one excel file into another without doing copy and pasting. I need to automate the process of inserting data but I cannot use copy-paste, because it puts data on a clipboard, and my Excel VBA program runs in a multi-user environment. So if one instance of a program is copying data into clipboard, and another instance is pasting it at the same time, it will paste incorrect data.

  2. #2
    Join Date
    Aug 2011
    Posts
    460

    Re: How to insert common data from on Excel File to another

    You will need both spreadsheets open, but try this;
    Code:
    Option Explicit
    
    Sub MyMacro()
    Dim MyVariable As String
    
    Windows("File2.xls").Activate 'Use the window name to select the file
    MyVariable = Range("A1") 'Use a variable to store the data from "A1".
    
    Windows("File1.xls").Activate 'Select the second workbook.
    Range("A1").Select 'Select cell "A1".
    ActiveCell.Text = MyVariable 'Use .Text to copy the data.
    End Sub

  3. #3
    Join Date
    Aug 2011
    Posts
    580

    Re: How to insert common data from on Excel File to another

    Try to read the below link. It shows some options to play with data between two cells. You can also search in some in the help file for more detailed. f you are just planing to move the files you simply right click and then click on move or copy. Choose appropriate options, that's all.

    Create a link to another cell, workbook, or program

Similar Threads

  1. Replies: 2
    Last Post: 22-01-2012, 11:59 AM
  2. How to insert HyperTerminal data into excel sheet.
    By Shaina Na in forum Microsoft Project
    Replies: 1
    Last Post: 08-01-2012, 07:44 PM
  3. Identifying common data in an excel sheet
    By Hebrew in forum Windows Software
    Replies: 5
    Last Post: 25-12-2009, 06:57 PM
  4. Insert data from an Excel file into MySQL.
    By Antonio1 in forum Windows Software
    Replies: 3
    Last Post: 24-11-2009, 01:51 AM
  5. Insert Excel data into Word
    By Rivita in forum Windows Software
    Replies: 2
    Last Post: 24-09-2009, 02:09 PM

Tags for this Thread

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
  •  
Page generated in 1,713,996,016.18376 seconds with 17 queries