انتقل إلى المحتوى الرئيسي

كيفية دمج أوراق العمل أو المصنفات أو دمجها في ورقة عمل واحدة؟

في عملنا اليومي ، قد نواجه مشكلة تتمثل في دمج مئات الأوراق أو المصنفات في ورقة واحدة لتحليل البيانات والتي تستغرق وقتًا طويلاً إذا كنت تستخدم الأمر Copy and Paste في Excel. هنا في هذا البرنامج التعليمي ، سأقدم بعض النصائح لحل هذه الوظيفة بسرعة.

doc الجمع بين 1

الإنتقال السريع

دمج جميع أوراق المصنف النشط في ورقة واحدة باستخدام VBA
دمج عشرات الأوراق أو المصنفات في ورقة عمل / مصنف واحد بنقرات
دمج جدولين في جدول واحد والتحديث بعمود مع النقرات
تنزيل ملف نموذج


دمج جميع أوراق المصنف النشط في ورقة واحدة باستخدام VBA

في هذا القسم ، أقدم رمز VBA الذي سينشئ ورقة جديدة لتجميع كل أوراق المصنف النشط أثناء تشغيله.

1. قم بتنشيط المصنف الذي تريد دمج كل أوراقه ، ثم اضغط على + مفاتيح لفتح ميكروسوفت فيسوال باسيك للتطبيقات نافذة.

2. في النافذة المنبثقة ، انقر فوق إدراج > وحدة لإنشاء برنامج نصي جديد للوحدة النمطية.

3. انسخ الكود أدناه والصقه في البرنامج النصي.

Sub Combine()
'UpdatebyExtendoffice
Dim J As Integer
On Error Resume Next
Sheets(1).Select
Worksheets.Add
Sheets(1).Name = "Combined"
Sheets(2).Activate
Range("A1").EntireRow.Select
Selection.Copy Destination:=Sheets(1).Range("A1")
For J = 2 To Sheets.Count
Sheets(J).Activate
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select
Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)
Next
End Sub
doc الجمع بين 2

4. صحافة F5 مفتاح ، ثم تم دمج جميع البيانات عبر الأوراق في ورقة جديدة تسمى Combined والتي يتم وضعها في مقدمة كل الأوراق.


بعد التمرير

هل ترغب في الحصول على زيادة في الأجور وكثير من الوقت لمرافقة العائلة؟

يعمل Office Tab على تحسين كفاءتك بنسبة 50٪ في Microsoft Office الذي يعمل الآن

لا يمكن تصديق أن العمل في مستندين أو أكثر أسهل وأسرع من العمل في مستند واحد.

بالمقارنة مع المتصفحات المعروفة ، فإن الأداة المبوبة في Office Tab أكثر قوة وفعالية.

قلل مئات النقرات على الماوس وكتابة لوحة المفاتيح كل يوم من أجلك ، وداعًا يد الماوس الآن.

إذا كنت تعمل عادةً في مستندات متعددة ، فسيوفر Office Tab وقتًا رائعًا بالنسبة لك.

30- يوم تجريبي مجاني، بطاقة الإئتمان غير مطالب بها.

تفاصيل أكثرتحميل مجاني الآن


دمج عشرات الأوراق أو المصنفات في ورقة عمل / مصنف واحد بنقرات

باستخدام VBA ، يمكنك فقط دمج الأوراق في المصنف النشط ، ولكن كيف يمكنك دمج الأوراق عبر المصنفات في ورقة أو مصنف؟

دمج الأوراق عبر المصنفات في ورقة واحدة
doc الجمع بين 18

دمج الأوراق عبر المصنفات في مصنف واحد
doc الجمع بين 3

لحل هذه المهمة وتلبية المتطلبات الأخرى على مجموعة الأوراق ، فإن دمج تم تطوير الوظيفة بأربعة سيناريوهات مركبة:

  • ادمج عدة أوراق أو مصنفات في ورقة واحدة
  • ادمج عدة أوراق أو مصنفات في مصنف واحد
  • اجمع أوراق الاسم نفسها في ورقة واحدة
  • قم بدمج القيم عبر الأوراق أو المصنفات في ورقة واحدة

هنا يأخذ الخيار الثاني كمثال:

ادمج عدة أوراق أو مصنفات في مصنف واحد

بعد تركيب مجاني Kutools for Excel ، يرجى القيام بما يلي:

1. قم بتنشيط Excel ، انقر فوق كوتولس بلس > دمج، ينبثق مربع حوار لتذكيرك بإغلاق المصنفات التي تريد دمجها. انقر OK للمتابعة.
doc الجمع بين 4
doc الجمع بين 5

2. في ال اجمع أوراق العمل في الخطوة 1 الحوار ، تحقق اجمع أوراق عمل متعددة من مصنفات في مصنف واحد اختيار. انقر التالى للانتقال إلى الخطوة التالية من المعالج.
doc الجمع بين 6

3. انقر أضف > قم بتقديم or مجلد لإضافة المصنفات التي تريد دمجها في قائمة المصنفات جزء ، ثم يمكنك تحديد ورقة العمل التي سيتم ضمها معًا عن طريق التحقق من الأسماء قائمة ورقة العمل جزء. انقر التالى للانتقال إلى الخطوة الأخيرة في المعالج.
doc الجمع بين 7

4. في هذه الخطوة ، حدد الإعدادات التي تريدها. ثم اضغط نهاية.
doc الجمع بين 8

5. تنبثق نافذة لك لتحديد مجلد لوضع المصنف المدمج ، ثم انقر فوق حفظ.
doc الجمع بين 9

الآن تم دمج المصنفات في مصنف واحد. وفي مقدمة كل الأوراق ، يتم أيضًا إنشاء ورقة رئيسية تسمى Kutools for Excel تسرد بعض المعلومات حول الأوراق والروابط لكل ورقة.
doc الجمع بين 10

عرض توضيحي: دمج الأوراق / المصنفات في ورقة واحدة أو مصنف واحد

Kutools for Excel: 200 + أدوات مفيدة مفيدة ، وتبسيط المهام المعقدة في Excel في بضع نقرات.

قل وداعا ليد الفأر وداء الفقار العنقي الآن

300 أداة متقدمة من Kutools for Excel حل 80% مهام Excel في ثوانٍ ، تسحبك من آلاف النقرات بالماوس.

تعامل بسهولة مع 1500 سيناريو عمل ، لا داعي لإضاعة الوقت في البحث عن حلول ، لديك الكثير من الوقت للاستمتاع بحياتك.

قم بتحسين إنتاجية 80٪ لأكثر من 110000 شخص ذو كفاءة عالية كل يوم ، بالطبع بما فيهم أنت.

لم تعد تتعذب من الصيغ المؤلمة و VBA ، امنح عقلك راحة ومزاج عمل بهيج.

نسخة تجريبية مجانية مدتها 30 يومًا مع ميزات كاملة، واسترداد الأموال لمدة 30 يومًا دون أسباب.

الجسم الأفضل يصنع حياة أفضل.


دمج جدولين في جدول واحد والتحديث بعمود مع النقرات

إذا كنت ترغب في دمج جدولين في واحد وتحديث البيانات استنادًا إلى عمود كما هو موضح أدناه ، يمكنك تجربة دمج الجداول فائدة كوتولس ل إكسيل.
doc الجمع بين 11

Kutools for Excel: أكثر من 200 وظيفة إضافية مفيدة في Excel لتبسيط المهام المعقدة في بضع نقرات في Excel

بعد تركيب مجاني Kutools for Excel ، يرجى القيام بما يلي:

1. انقر كوتولس بلس > دمج الجداول لتمكين دمج الجداول المعالج.
doc الجمع بين 12

2. في الخطوة 1 من المعالج ، تحتاج إلى تحديد نطاقات الجدول الرئيسي وجدول البحث بشكل منفصل. ثم اضغط التالى.
doc الجمع بين 13

3. حدد عمود المفتاح الذي تريد تحديث البيانات في الجدول الرئيسي بناءً عليه. انقر التالى.
doc الجمع بين 14

4. ثم تحقق من الأعمدة في الجدول الرئيسي الذي تريد تحديث البيانات بناءً على جدول البحث. انقر التالى.
doc الجمع بين 15

5. في الخطوة 4 من المعالج ، حدد الأعمدة التي تريد إضافتها من جدول البحث إلى الجدول الرئيسي. انقر التالى.
doc الجمع بين 16

6. في الخطوة الأخيرة من المعالج ، حدد خيارات الإعداد حسب حاجتك. ثم اضغط نهاية.
doc الجمع بين 17

الآن تم تحديث الجدول الرئيسي للبيانات وإضافة بيانات جديدة بناءً على جدول البحث.

عرض توضيحي: دمج الأوراق / المصنفات في ورقة واحدة أو مصنف واحد

Kutools for Excel: 200 + أدوات مفيدة مفيدة ، وتبسيط المهام المعقدة في Excel في بضع نقرات.


تنزيل نموذج ملف

عينة


أدوات الإنتاجية الموصى بها

علامة تبويب Office - الاستعراض المبوب وتحرير وإدارة المستندات في Microsoft Office 2019-2003 و Office 365


علامة تبويب المكتب

وظيفة إضافية احترافية لتسريع Excel 2019-2007 ، تعمل على تقليص مهام الساعات إلى ثوانٍ

تتضمن هذه الوظيفة الإضافية العشرات من المجموعات المهنية ، مع أكثر من 300 خيارًا ستعمل على أتمتة معظم مهامك اليومية في Excel ، وتزيد من إنتاجيتك بنسبة 50٪ على الأقل. مثل مجموعات الاختيارات بنقرة واحدة والتحويلات المجمعة.
الآن هي فرصتك لتسريع نفسك مع Kutools for Excel!


Comments (168)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, I have a system that generates an excel file everyday. The daily file name is of format "<filename-12282021>". The 12282021 is the timestamp and it changes everyday creating a new excel file each day. I want to create a Master Workbook and then append the contents of the daily excel file into that master workbook. How can I automate it so it happens by itself everyday and the master file is update with contents of the daily file.   Thank you.
This comment was minimized by the moderator on the site
Hi rd2022, sorry that I have no idea to solve your problem so far. You can go to our forum https://www.extendoffice.com/forum/excel.html to leave this message, maybe some users have the same problem and has been solved.
This comment was minimized by the moderator on the site
In combining shhets I want to add one extra column in combined sheet as ShhetName
Can you suggest ?
This comment was minimized by the moderator on the site
The Combine function of Kutools for Excel can help you to insert sheet name in a new row of each combined range in the combined sheet by checking First row of each range (new row) in Insert worksheet information section in the last step of the Combine.
This comment was minimized by the moderator on the site
Hi - this function works well except my file has more than 900 sheets, and when I change the maximum number of rows (Loc 16, "A65536") to a higher number, the macro doesn't work. Is there a way to increase the number of rows that can be shown on the combine sheet?
This comment was minimized by the moderator on the site
The VBA code works fine but I want the data to be merged horizontally(side by side).
Hope you can help.
This comment was minimized by the moderator on the site
Hi,


Great Code and for the most part it works fantastically well.


Could I suggest creating a written tutorial for each line of code. I'd love to be able to play around with it to suit my Company's needs.

In the meantime however could you talk me through problems that would hinder this code from copying all data from each Sheet? I've noticed some sheets in my workbook aren't being copied at all.

To give you some context I'm dealing with roughly 330 sheets and they hold from 50 to 500 lines in each.


looking forward to hearing from you.
This comment was minimized by the moderator on the site
Hi, Daniel, I do not understand your question as you describe it not clearly, but if you have the Combine function in Excel, it can solve most of your question about combining sheets.
This comment was minimized by the moderator on the site
Hi,

Is it possible to only copy a particular range of cells for example A:4:FU38 from each sheet?


Also in the Combined sheet where the data is copied to, can the tab names from where the data is copied included in column A to enable lookups or to pivot the data?


Finally, can i specify the list of worksheets from which to copy the data across or maybe i can specify something like copy all worksheets to the left of a particular worksheet in the file.


Thanks in advance for your help
This comment was minimized by the moderator on the site
Hi, HS, you mean to combine same ranges from sheets into one sheet, it that right? If so, this article may help you: https://www.extendoffice.com/documents/excel/2754-excel-combine-ranges-from-different-worksheets-into-one.html#a3
This comment was minimized by the moderator on the site
This VBA code is an absolute lifesaver. Thank you!!
This comment was minimized by the moderator on the site
Hi. This code works well but I have the same problem as adj. The 1st row form each tab doesn't appear in the combined tab - except he first tab. Thanks
This comment was minimized by the moderator on the site
Just delete "Selection.Offset(1, 0).Resize(Selection.Rows.Count - 1).Select" from the code.

If you want to merge all rows from all worksheets, just use the code:

Sub Combine()

'UpdatebyExtendoffice

Dim J As Integer

On Error Resume Next

Sheets(1).Select

Worksheets.Add

Sheets(1).Name = "Combined"

Sheets(2).Activate

Range("A1").EntireRow.Select

Selection.Copy Destination:=Sheets(1).Range("A1")

For J = 2 To Sheets.Count

Sheets(J).Activate

Range("A1").Select

Selection.CurrentRegion.Select

Selection.Copy Destination:=Sheets(1).Range("A65536").End(xlUp)(2)

Next

End Sub
This comment was minimized by the moderator on the site
Yes, the code only can keep first row of the first tab, because it is used to consolidate, if you want to keep all contents of each sheet, you can try Combine utility of Kutools for Excel, it is free fior 60 days
This comment was minimized by the moderator on the site
i had a problem when I try to combine all same name worksheet to one worksheet, it works but some value are missing. so what should i do?
This comment was minimized by the moderator on the site
Hello, elok, did the problem appear while you applying Combine function? If so, please go to contact us to describe the problem with more details, our support will handle the problem for you.
This comment was minimized by the moderator on the site
Thanks that macro saved my day. I had over 40 sheets of data to combine into one and although my computer bogged for a minute or two, it completed without issue. The only modification I made was I tweaked the macro to start with A2 instead of A1 since A1 was my column headers.
This comment was minimized by the moderator on the site
Thanks for your support, Andrew, I am glad that the macro can help you.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations