+ Reply to Thread
Results 1 to 7 of 7

create a list in file 1 with data from file 2,3,4...n

  1. #1
    Registered User
    Join Date
    06-27-2008
    Location
    Norway
    Posts
    5

    create a list in file 1 with data from file 2,3,4...n

    Hi.

    I need to make a macro that makes an "intelligent" list (cant find any better word for it) in file 1 by using data in file 2.

    The case:
    I have several Excel files for calculation (called calculation file 1,2...n), each with a list of output data. I also have an Excel file (called main file) that uses all the output data from the calculation sheets. The calculation sheets are all the same, just with different input data.

    The problem:
    The number of caluculation sheets and therefore the name of these sheets change, thus I cannot make simply a normal reference in the main file.

    What I need:
    I am thinking that a "submit" button in each calucation file would work. Such that when you press it, the output data are written to the main file. However, the list then created needs to be "intelligent", such that I can press the submit button in each file and the data then are written at the bottom of the list.

    Can someone help with this or point me in the correct direction?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    What do you mean by "intelligent"? Are you looking to write to the next empty row in the main workbook?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-27-2008
    Location
    Norway
    Posts
    5
    Quote Originally Posted by royUK
    What do you mean by "intelligent"? Are you looking to write to the next empty row in the main workbook?
    Yep, that is correct and exactly what I need.
    Last edited by lanes; 06-27-2008 at 05:40 AM.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Something like this
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-27-2008
    Location
    Norway
    Posts
    5
    I am fairly new to this, but from what I can see something in the lines of that should work. However, I get an error when running the script:

    Object doesn't support this property or method.

    For the two last lines in your code.

  6. #6
    Registered User
    Join Date
    06-27-2008
    Location
    Norway
    Posts
    5
    Got it working now. My mistake.

    Thanks a lot!

  7. #7
    Registered User
    Join Date
    06-27-2008
    Location
    Norway
    Posts
    5
    hmm... I just figured out I got another problem. Would you care to take a look at it?

    I sometimes update the input data in the calculation file, and I thus need a function that will overwrite the correct data (and leave the other as it is) in the main file.

    I am thinking this can be done by simply using the function above to paste references (such as =[Calculation1.xls]Sheet1!A1) instead of the actual values. Can this be done?

    Thanks a lot in advance!

    EDIT: That's strange. It does actually write the data as references now.. it did not in the beginning.. :S
    Last edited by lanes; 06-27-2008 at 10:14 AM.

+ 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