Skip to main content

Conas bileoga oibre nó leabhair oibre a chumasc nó a chomhdhlúthú i mbileog oibre amháin?

Inár gcuid oibre laethúla, b’fhéidir go mbeidh fadhb againn a chumasc na céadta bileog nó leabhar oibre le chéile i mbileog amháin chun anailís a dhéanamh ar shonraí a thógann cuid mhór ama má úsáideann tú an t-ordú Cóipeála agus Greamaigh in Excel. Anseo sa rang teagaisc seo, cuirfidh mé roinnt leideanna ar fáil chun an post seo a réiteach go tapa.

doc le chéile 1

SONRADH CEOL

Gach bileog de leabhar oibre gníomhach a chumasc i mbileog amháin le VBA
An iliomad bileoga nó leabhar oibre a chumasc i mbileog oibre / leabhar oibre amháin le cad a tharlaíonn
Dhá thábla a chumasc i gceann amháin agus iad a nuashonrú le colún le cad a tharlaíonn
Íoslódáil comhad samplach


Gach bileog de leabhar oibre gníomhach a chumasc i mbileog amháin le VBA

Sa chuid seo, soláthraím cód VBA a chruthóidh bileog nua chun gach bileog den leabhar oibre gníomhach a bhailiú agus tú á rith.

1. Gníomhachtaigh an leabhar oibre a theastaíonn uait a bhileoga uile a chur le chéile, ansin brúigh + eochracha le hoscailt Microsoft Visual Basic d’Fheidhmchláir fhuinneog.

2. I bhfuinneog popping, cliceáil Ionsáigh > Modúil chun script Modúl nua a chruthú.

3. Cóipeáil thíos an cód agus greamaigh iad chuig an script.

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 le chéile 2

4. Brúigh F5 eochair, ansin rinneadh na sonraí go léir ar bhileoga a chumasc le bileog nua darb ainm Comhcheangailte a chuirtear os comhair na mbileog go léir.


bogadh ot

Ar mhaith leat Ardú Pá a bheith agat agus an-chuid ama le dul in éineacht leis an teaghlach?

Feabhsaíonn Tab Office d’éifeachtúlacht 50% in Microsoft Office Working Right Now

Dochreidte, tá sé níos éasca agus níos tapa oibriú ag dhá dhoiciméad nó níos mó ná a bheith ag obair ag ceann amháin.

I gcomparáid le brabhsálaithe aitheanta, tá an uirlis tabbed i Office Tab níos cumhachtaí agus níos éifeachtaí.

Laghdaigh na céadta cliceáil luch agus clóscríobh méarchláir gach lá duit, slán a fhágáil le lámh na luiche anois.

Má oibríonn tú de ghnáth ag ildhoiciméid, sábhálfaidh Office Tab am iontach duit.

30- triail saor in aisce lá, níl aon chárta creidmheasa ag teastáil.

Leigh Nios moÍoslódáil saor in aisce anois


An iliomad bileoga nó leabhar oibre a chumasc i mbileog oibre / leabhar oibre amháin le cad a tharlaíonn

Leis an VBA, ní féidir leat ach bileoga a chur le chéile sa leabhar oibre gníomhach, ach conas is féidir leat bileoga a chumasc thar leabhair oibre le bileog nó leabhar oibre?

Cumaisc bileoga ar fud leabhair oibre i mbileog amháin
doc le chéile 18

Cumaisc bileoga ar fud leabhair oibre in aon leabhar oibre amháin
doc le chéile 3

Chun an post seo a réiteach agus chun riachtanais eile maidir le comhcheangal bileoga a shásamh, déanann an Chomhcheangail Forbraíodh feidhm le ceithre chás teaglaim:

  • Comhcheangail bileoga iolracha nó leabhair oibre i mbileog amháin
  • Comhcheangail bileoga iolracha nó leabhair oibre in aon leabhar oibre amháin
  • Comhcheangail bileoga ainm céanna i mbileog amháin
  • Déan luachanna a chomhdhlúthú thar bhileoga nó leabhair oibre i mbileog amháin

Seo an dara rogha mar shampla:

Comhcheangail bileoga iolracha nó leabhair oibre in aon leabhar oibre amháin

Tar éis suiteáil saor in aisce Kutools for Excel, déan mar atá thíos le do thoil:

1. Gníomhachtaigh Excel, cliceáil Kutools Plus > Chomhcheangail, tagann dialóg amach le cur i gcuimhne duit na leabhair oibre a theastaíonn uait a chur le chéile a dhúnadh. Cliceáil OK chun leanúint ar aghaidh.
doc le chéile 4
doc le chéile 5

2. Sa Comhcheangail Bileoga Oibre céim 1 dialóg, seiceáil Comhcheangail iliomad bileoga oibre ó leabhair oibre in aon leabhar oibre amháin rogha. Cliceáil Ar Aghaidh chun dul go dtí an chéad chéim eile den draoi.
doc le chéile 6

3. cliceáil Cuir > Comhad or Fillteán chun na leabhair oibre is mian leat a chur le chéile a chur leis an Liosta leabhar oibre pána, ansin is féidir leat a shonrú cén bhileog oibre a cheanglófar le chéile trí ainmneacha a sheiceáil isteach Liosta bileog oibre pána. Cliceáil Ar Aghaidh chun dul go dtí an chéim dheireanach den draoi.
doc le chéile 7

4. Sa chéim seo, sonraigh na socruithe de réir mar is gá duit. Ansin cliceáil Críochnaigh.
doc le chéile 8

5. Tagann fuinneog amach duit fillteán a roghnú chun an leabhar oibre comhcheangailte a chur, ansin cliceáil Sábháil.
doc le chéile 9

Anois tá na leabhair oibre curtha le chéile in aon leabhar oibre amháin. Agus ag tosach gach bileog, cruthaítear máistir-bhileog darb ainm Kutools for Excel a liostaíonn roinnt faisnéise faoi na bileoga agus na naisc do gach bileog.
doc le chéile 10

Taispeántas: Comhcheangail bileoga / leabhair oibre i mbileog amháin nó i leabhar oibre

Kutools for Excel: 200 + uirlisí úsáideacha úsáideacha, ag simpliú na dtascanna casta in Excel i gcúpla cad a tharlaíonn.

Slán a fhágáil le Spondylosis Láimhe Luiche agus Ceirbheacs Anois

300 uirlisí chun cinn de Kutools le haghaidh Excel réiteach 80% Tascanna Excel i soicindí, tú a tharraingt amach as na mílte cliceáil ar an luch.

Déileáil go héasca le 1500 cás oibre, ní gá am a chur amú le réitigh a chuardach, bíodh go leor ama agat chun taitneamh a bhaint as do shaol.

Feabhas a chur ar tháirgiúlacht 80% do 110000+ duine ardéifeachtach gach lá, tú féin san áireamh ar ndóigh.

Gan a bheith cráite ag foirmlí pianmhara agus VBA a thuilleadh, tabhair suaimhneas oibre agus lúcháir oibre d’inchinn.

Triail saor in aisce 30 lá le gnéithe iomlána, airgead 30 lá ar ais gan chúiseanna.

Cruthaíonn Comhlacht Níos Fearr Saol Níos Fearr.


Dhá thábla a chumasc i gceann amháin agus iad a nuashonrú le colún le cad a tharlaíonn

Más mian leat dhá thábla a chumasc i gceann amháin agus sonraí bunaithe ar cholún a nuashonrú mar atá thíos an pictiúr a thaispeántar, is féidir leat triail a bhaint as an Cumaisc Táblaí fóntais de Kutools le haghaidh Excel.
doc le chéile 11

Kutools for Excel: níos mó ná 200 breiseán áisiúil Excel chun tascanna casta a shimpliú i gcúpla cad a tharlaíonn in Excel

Tar éis suiteáil saor in aisce Kutools for Excel, déan mar atá thíos le do thoil:

1. cliceáil Kutools Plus > Cumaisc Táblaí a chumasú Cumaisc Táblaí draoi.
doc le chéile 12

2. I gcéim 1 den draoi, ní mór duit na príomh-raonta tábla agus amharc-tábla a roghnú ar leithligh. Ansin cliceáil Ar Aghaidh.
doc le chéile 13

3. Seiceáil an colún eochair ar mhaith leat sonraí a nuashonrú sa phríomh tábla bunaithe ar. Cliceáil Ar Aghaidh.
doc le chéile 14

4. Ansin seiceáil na colúin sa phríomh tábla a theastaíonn uait na sonraí a nuashonrú bunaithe ar an tábla lookup. Cliceáil Ar Aghaidh.
doc le chéile 15

5. I gcéim 4 den draoi, seiceáil na colúin is mian leat a chur ón mbord amharc go dtí an príomh tábla. Cliceáil Ar Aghaidh.
doc le chéile 16

6. Sa chéim dheireanach den draoi, sonraigh na roghanna socraithe de réir mar is gá duit. Ansin cliceáil Críochnaigh.
doc le chéile 17

Anois tá na sonraí nuashonraithe ar an bpríomh tábla agus sonraí nua a chur leis bunaithe ar an tábla lookup.

Taispeántas: Comhcheangail bileoga / leabhair oibre i mbileog amháin nó i leabhar oibre

Kutools for Excel: 200 + uirlisí úsáideacha úsáideacha, ag simpliú na dtascanna casta in Excel i gcúpla cad a tharlaíonn.


Íoslódáil Comhad Samplach

sampla


Uirlisí Táirgeachta Molta

Cluaisín Oifige - Brabhsáil Tabbed, Eagarthóireacht, Bainistiú Doiciméid In Microsoft Office 2019 - 2003 Agus Office 365


cluaisín oifige

Laghdaíonn Breiseán Gairmiúil le haghaidh Excel Luasghéarú 2019-2007, tascanna uaireanta go soicindí

Cuimsíonn an breiseán seo mórán de na grúpaí gairmiúla, le 300+ rogha, uathoibreoidh sé an chuid is mó de do thascanna laethúla in Excel, agus méadóidh sé do tháirgiúlacht 50% ar a laghad. Den sórt sin mar ghrúpaí de optons aon-cliceáil agus tiontaithe baisc.
Anois tá seans agat tú féin a bhrostú le Kutools le haghaidh 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