Forum Discussion

evap22's avatar
evap22
Copper Contributor
Feb 19, 2023

Join and update data

Hi, I need help. I need to join 3 different sheets of files into one Excel sheet and update it per day.

  • GeorgieAnne's avatar
    GeorgieAnne
    Iron Contributor
    Hello evap22

    By "I need to join..." you mean get the data from a sheet and put it into another sheet?
    Lets say we call a sheet Source and another Target. We need to make all the data in Source be in Target.

    Do I understand your question? If yes, then I would say it depends and here is how:

    A) Do you want to add the data from Source at the end of the data in Target? So you will have both sets of data.
    B) Does the data from Source replace the data in target?
    C) How much data do you have to "move"
    D) What about formulas, do you want their values of keep the formulas?
    E) What about the cell formatting, column and row sizes, now about conditional formatting do all these have to be copied?
    F) When you say "different sheets of files..." does that mean you have multiple files (workbooks) or a single workbook with multiple worksheets?

    You can do something like:
    In cell A17 on Target worksheet you can place this formula:
    =Source!A22 (If sheets are in the same workbook) or ='[Workbook Name.xls?]Source'!A22 (If sheets are NOT in the same workbook)
    and cell A17 in Target will have the value of cell A22 in Source sheet.

    This can be done if you have a few cells to work with. But if you have multiple or many then its not an efficient way. So answering the questions above will give us a better measure as to how to develop the solution.

    This is something very important: If you use this method, then the two Source and Target workbooks will be linked. You change Source Target will change.

    Let us know.
    • evap22's avatar
      evap22
      Copper Contributor

      GeorgieAnne 

      I need to link a specific sheet of the files that you will see below:

       

      I need to link a specific sheet of the files that you will see below


      Each File has several sheets, I only need to link a specific sheet from each file, example:
      From the File: SOLICITUDES A1, I will need the CUSTOMERS sheet
      From the File: SOLICITUDES OC2 , I will need the REQUESTS sheet
      From the File: SOLICITUDES M3, I will need the REQUESTSC sheet
      CLIENTS, REQUEST AND REQUEST These would be like the source sheets.
      my coworkers modify these files every day. I need to create a new file to consolidate the information in a single sheet.
      I need to link the CUSTOMERS, REQUESTS, and REQUESTSC sheets and consolidate them into a new file and into one sheet.
      I would like this new file to be updated whenever the source files are changed.
      If possible if this can be done in a MACRO with Visual Basic that automates the process, that would be great. It is not a Power Query option.

      And according to what you asked me
      A) Do you want to add the Source data to the end of the Destination data? So they will have both sets of data.
      A: I need the source data to be reflected in the new workbook and a single destination sheet.
      B) Does the data from the source replace the data from the destination?
      Every time the source data is changed, I need it to be seen in the destination sheet.
      C) How much data do you have to "move"?
      It would be a lot of data, but I don't want to move or modify the source sheet, I'm interested in the destination sheet being modified according to the source sheets.
      D) What about the formulas? Do you want their values to hold the formulas?
      However, I am only interested in seeing the information.
      E) What about cell formatting, column and row sizes, now about conditional formatting, this all has to be copied?
      All source sheets keep the same pattern. I just need the header on the target sheet to be created to be only one.

       

      • GeorgieAnne's avatar
        GeorgieAnne
        Iron Contributor
        Hello again evap22,

        OK when you say "I would like this new file to be updated whenever the source files are changed" that would require some recursive, or human initiated, process to check if the Source workbook has been updated, and if it has then update the Target workbook. This is a bit complicated but doable. I have some code at work that I can modify and share with you.

        But again, look at the solutions I proposed until you get the code implemented. When you have a worksheet that you need to copy data from see ='[Workbook Name.xls?]Source'!A22 (If sheets are NOT in the same workbook) Not the best solution but if you can't wait it is your best bet.

Resources