+ Reply to Thread
Results 1 to 11 of 11

Updating excel file from another excel file

  1. #1
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Updating excel file from another excel file

    Hi, I want to know if it is possible to update an excel file from another excel file through vba.
    For example, I have a master excel file database, containing data for March 2019, April 2019, May 2019.
    Then, I received a file that is June 2019.
    I want to able to go to the master excel file and auto update June data in.
    Is this possible?

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Updating excel file from another excel file

    It is possible. If you wish additional help, then read the yellow banner at the top of this page on how to attach a file.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Re: Updating excel file from another excel file

    Ok sure, I will create a new post. Thank you

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Updating excel file from another excel file

    Do not create a new post. Edit this one. If you create a new post, it will be closed as a duplicate.

    I have merged your threads. Do not duplicate requests for the same issue. If you have new information, just add it to the thread.
    Last edited by alansidman; 09-07-2020 at 05:27 PM.

  5. #5
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Automatically Pull in New Report Data Into Excel

    Hi, I want to automatically pull in new report data into one excel masterfile. I receive monthly report and I want to update it to my main excel database. I try using power query to do it , but unable to do it because my monthly report are in an inconsistent format as shown in the pictures. However, the labeling and names are more or less consistent .
    ExcelExample3.png
    ExcelExample4.png
    I am planning to extract the data as shown in the picture into a masterfile. The objective will be that when I recieve a monthly report , all I need to do is to put it in a folder , go to master database and press refresh and it will automatically update it.
    Since the labeling and column names are consistent, I am thinking if there is such thing as a vlookup function in power query that allow me to extract the data.
    Any suggestion is welcome . Thank you very much.
    Attached is some sample files
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Updating excel file from another excel file

    mar19.xlsx, Apr19.xlsx must be in one folder
    MainDatabase should not be in the same folder above.
    Verify the value, some are different from yours.
    Please Login or Register  to view this content.
    Last edited by jindon; 09-08-2020 at 07:06 PM. Reason: One line replaced

  7. #7
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Re: Updating excel file from another excel file

    This is amazing work. Could I sent you a private message to understand the code better? I am a beginner VBA user and would like to update this code in the future. Thank you.

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Updating excel file from another excel file

    One line in the code has been replaced.

    You can continue here as long as it relates to your original question.

    Asking question via PM is not allowed by the forum rule.

  9. #9
    Registered User
    Join Date
    08-31-2020
    Location
    singapore
    MS-Off Ver
    2019
    Posts
    16

    Re: Updating excel file from another excel file

    Hi, I have some question listed below.
    1) if my monthly data happen to have a new product,it wont register the new product into the database. I want to be able to add the new product into the database, refresh it and extract the data for that product.
    2)Also, for the monthly data, if the "gross sales" column is a different position, it doesnt work.
    I want something to be more dynamic like what I describe in the photo below.
    Excelexample5.png
    excelexample7.png

    3)Also, may I know which part of the code do I adjust, such that it does not take the whole file name in the database. For example, if my monthly data file is called
    "ABC_Mar19", I only want "Mar19" in my database, not the full name.
    Appreciate your help and advice regarding this. Thank you so much.
    Last edited by coltan123; 09-09-2020 at 11:05 AM.

  10. #10
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Updating excel file from another excel file

    Possible solution...
    Please Login or Register  to view this content.

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Updating excel file from another excel file

    Your new date headings are different.
    It was like "Jun-19" and serial date.
    If it changes like that, I don't think I can code it.

+ 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. [SOLVED] Convert txt. file to excel file <>excel to txt. File Layout 116 characters - price databas
    By costi_linho12 in forum Excel Programming / VBA / Macros
    Replies: 61
    Last Post: 10-05-2015, 01:33 PM
  2. Can't find file when updating Excel tabel with PowerPivot - Where is the file?
    By oleisbest in forum PowerPoint Formatting & General
    Replies: 0
    Last Post: 12-16-2014, 12:06 PM
  3. Replies: 0
    Last Post: 03-20-2014, 10:21 PM
  4. [SOLVED] Updating values in an excel file with data from multiple excel files
    By ScarfaceLex in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 07-17-2012, 02:37 PM
  5. Updating an Excel file
    By Ranew in forum Excel General
    Replies: 0
    Last Post: 05-09-2011, 10:24 AM
  6. Replies: 1
    Last Post: 01-31-2011, 07:10 PM
  7. [SOLVED] Excel updating from XML file - file path specific?
    By Sean in forum Excel General
    Replies: 4
    Last Post: 08-05-2005, 08:05 AM

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