Excel Macro to combine multiple Excel Workbooks

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ต.ค. 2024

ความคิดเห็น • 32

  • @hs5379
    @hs5379 2 ปีที่แล้ว +1

    Thank you for wonderful video! But how we can process if we want collated file from specific sheet from all active workbook. Can you please assist?

  • @doubledouble_jk
    @doubledouble_jk ปีที่แล้ว +1

    Thank you for this! My code finally worked! 😭

  • @faisalshaikh7501
    @faisalshaikh7501 3 ปีที่แล้ว +1

    Very informative and clearly explained.
    Thank you very much..🙂
    How can we consolidate that entire data into single sheet ?

    • @AjayAnandXLnCAD
      @AjayAnandXLnCAD  3 ปีที่แล้ว

      Better to use Power Query for this task. I have done a video on this topic.

  • @dilipchaturvedi17
    @dilipchaturvedi17 2 หลายเดือนก่อน

    Hi Anand, First of all thanks for making this video it is very helpful. Can you help me to provide a code where i have 4 excel workbook and each workbook has 4 or some have 5 sheets i want to create a macro into which i want an only specific sheet data not complete data. Like from 1st workbook i need only 2 sheets and from second workbook i need 1 sheet and so no . How can i achieve this task ?

  • @amitmachhi2339
    @amitmachhi2339 3 ปีที่แล้ว +1

    Hi Ajay, Thanks for the video its useful. Could you please tell - How we can change the name of all copied sheets as the name of file or workbook name i.e. "Sheet (1)" "Sheet(2)" etc. to Co. A, Co. B .....

    • @AjayAnandXLnCAD
      @AjayAnandXLnCAD  3 ปีที่แล้ว

      I have done a few videos on Adding/Naming worksheets. Please go through the videos section of this channel to find them.

  • @gurumoorthy2275
    @gurumoorthy2275 4 ปีที่แล้ว +2

    Thank you

  • @fishfoot123
    @fishfoot123 2 ปีที่แล้ว

    Hi Anand sir,
    When the macro is completed the macro updating shee1 2, 3 and so on. How it can be made as file names as sheet name.
    The same question some one had asked long back, the reason is, in the video the file name has been updated in the sheet name. When we perform the same process the sheet name is not updating.
    Please help us to correct it.

  • @sat1460
    @sat1460 5 ปีที่แล้ว +1

    Thanks again

    • @AjayAnandXLnCAD
      @AjayAnandXLnCAD  5 ปีที่แล้ว

      My pleasure and thank you for letting me know

  • @Neale91
    @Neale91 4 ปีที่แล้ว +1

    Hi Ajay Anand. Thanks for this upload. I am just starting out with VBA and this macro is beyond anything I could have done myself.
    However, I noticed in the line "Sheet.Copy After:=ThisWorkbook.Sheets(1)", this adds each sheet after the first, and so the sheet order is reversed.
    To maintain the order of sheets, I have altered the above code to: "Sheet.Copy After:=ThisWorkbook.Sheets(ThisWorkbook.Sheets.Count)".

  • @arnodewet13
    @arnodewet13 3 ปีที่แล้ว

    Hi - What adjustment can be made if I want to transfer only specific sheets from various workbooks. Example I have 5 workbooks and I want to combine all sheets named "2" in those workbooks to one file. Thank you

  • @10morrisonka
    @10morrisonka 5 ปีที่แล้ว +1

    Hello, hello ! Who is the CHAMP again !!😊😊😊😘😘😘

    • @AjayAnandXLnCAD
      @AjayAnandXLnCAD  5 ปีที่แล้ว +1

      Like always, You ☺️

    • @10morrisonka
      @10morrisonka 5 ปีที่แล้ว +1

      @@AjayAnandXLnCAD That is so transferable !
      You transferred championsity:-) from you to me !!
      Thank you, Ay !!💖💖💖

  • @amitkanji
    @amitkanji 3 ปีที่แล้ว

    How to arrange the sheets in consolidated sheet the way we want?

  • @santoshm78
    @santoshm78 3 ปีที่แล้ว +1

    Nice sir

  • @vipulborule5532
    @vipulborule5532 3 ปีที่แล้ว

    Hi .
    I want all the data to copy in one sheet it self.
    For instance: i have 10 workbook and each workbook has data in two sheets. So macro should copy the sheet 1 and past in sheet 1 and the data which is in sheet 2 should copy past in sheet 2. This has to been done for all the 10 work books.
    Request you to respond.
    Thanks in advance

    • @AjayAnandXLnCAD
      @AjayAnandXLnCAD  3 ปีที่แล้ว +1

      I suggest Power Query for this task. Please refer to my articles on this topic.

  • @dineshmuthiah2127
    @dineshmuthiah2127 3 ปีที่แล้ว +1

    If you give the code on description it will use to us

    • @AjayAnandXLnCAD
      @AjayAnandXLnCAD  3 ปีที่แล้ว

      Please visit my website for the VBA code shown here.

  • @chillpill7348
    @chillpill7348 3 ปีที่แล้ว

    What if I dont want it to appear in multiple sheets? I need a data in 1 sheet combined from all sheets, this isnt useful then.

  • @stefanescuh
    @stefanescuh 4 ปีที่แล้ว +1

    Your video it is good, but very fast to watch! Please explain slowly! Thanks a lot for your ideas!

    • @AjayAnandXLnCAD
      @AjayAnandXLnCAD  4 ปีที่แล้ว

      Thank you for the suggestion. Will make necessary improvements in the videos to come.

    • @dayp79
      @dayp79 4 ปีที่แล้ว

      If you hit the 'gear' next to the closed caption symbol on the video you can slow the playback speed,

  • @surajrajeniya9703
    @surajrajeniya9703 3 ปีที่แล้ว

    Nice

  • @nithiyasrinivasan3309
    @nithiyasrinivasan3309 3 ปีที่แล้ว

    I have done everything and no error showing.. stil it's not working

  • @SuperAjeeth
    @SuperAjeeth ปีที่แล้ว

    Somehow its not working for me here is code which I copied
    Error is - Can't Execute Code In Break Mode , What Mistake I made here
    Sub CombineWorkBooks2()
    Dim FName As String, FPath As String
    Dim Sheet As Worksheet

    Dim FDialog As FileDialog

    Set FDialog = Application.FileDialog(msoFileDialogFilePicker)

    If FDialog.Show = -1 Then

    Worksheets("Combine Sheets").Cells(2, 2).Value = FDialog.SelectedItems(1)

    End If

    Application.ScreenUpdating = False

    FPath = Worksheets("Combine Sheets").Cells(2, 2).Value

    FName = Dir(FPath & "\*.xls*")

    Do While Name ""

    Workbooks.Open Filename:=FPath & "\" & Name, ReadOnly:=True

    For Each Sheet In ActiveWorkbook.Sheets

    Sheet.Copy After:=ThisWorkbook.Sheets(1)

    Next Sheet

    Workbooks(FName).Close
    FName = Dir()

    Loop

    Application.ScreenUpdating = True
    End Sub