+ Reply to Thread
Results 1 to 4 of 4

Input in cell will open file and copy values from it

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    33

    Input in cell will open file and copy values from it

    Hello All,

    I would like to ask you to help me with one issue. It is possible to creat macro/or more. Here is what i am looking for.

    Example

    I have file (workbook 1/sheet1) where i am scaning/writing code of part in column C:C after i scan/wrote number in C2 i want to automatically run macro that will open specific file(workbook2/sheet1) (link for this file is in cell D1) and copy last row area (A10:F10) from this file next to the C2 in workbook1/sheet1.

    Its this possible? If necessary i can attache the files i am talking about. Thanks for help.

  2. #2
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Input in cell will open file and copy values from it

    It is possible. You should try to build out your macro first and then I or someone here can elaborate on where to go from where you start. This will help with your learning as well as make it easier for us to understand where you are getting stuck so that we can better assist.

    To get you started, This is the simplest code that I am aware of that will allow you to have a macro run based on cell update. You will need to add this to Sheet 1 of workbook 1. Make sure you replace the YourMacro with the name of the macro that you are using to call on Workbook 2, copy selection then paste to desired location. Again, make the sample workbooks and share so we can further assist.
    Please Login or Register  to view this content.
    -If you think you are done, Start over - ELeGault

  3. #3
    Registered User
    Join Date
    07-24-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Input in cell will open file and copy values from it

    Hello EleGault,

    Sorry i didn't post what i already made. One issue is that macro open the file automatically but it is look like it is trying to open it twice. The part where i am really stuck and don't know how to proceed is to find last row in workbook 2 and copy it in workbook one next to the scanned code. If you need any more info let me know. Thanks for your support.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-24-2013
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    33

    Re: Input in cell will open file and copy values from it

    I made some progress the pasting part is working exactly as i want but the problem is copy part. Could someone fix the code so it will be copy last row in workbook 2 but only columns A:I?

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Open 2nd file(CSV) from cell reference, copy columns to main file & close 2nd file
    By Langchop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2013, 05:09 AM
  2. How to copy values from one OPEN workbook (with variable file name) to another
    By Kitko in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-25-2013, 01:50 PM
  3. [SOLVED] VB to open a file, input on a file and close again, with NO macros/vb saved to file
    By unreal_event_horizon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2012, 11:41 AM
  4. Open csv file and copy rows when certain values occur
    By Alexon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2012, 06:58 PM
  5. [SOLVED] open variably named file, copy/paste data into consolidation file, open next file in list
    By sllawrence1968 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 09:49 PM

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