Note: The other languages of the website are Google-translated. Back to English

Sut i gasglu data o ddalennau lluosog i brif ddalen yn Excel?

Mewn peth amser, efallai y bydd angen i chi gasglu data o sawl dalen i mewn i un brif ddalen ar gyfer cydgrynhoi neu wneud gweithrediadau eraill fel islaw'r screenshot a ddangosir, ond mae copïo a gludo'r cynnwys fesul un yn drafferthus, a oes unrhyw driciau yn gallu ei ddatrys yn gyflym. Excel?

Casglu data o ddalennau lluosog yn un â swyddogaeth Cydgrynhoi

Casglu data o daflenni lluosog i mewn i un gyda chod VBA

Casglu data o ddalennau lluosog yn un sydd â swyddogaeth Cyfuno bwerussyniad da3


Casglu data o ddalennau lluosog yn un â swyddogaeth Cydgrynhoi

Os ydych chi am gasglu data o sawl dalen i un ddalen yn yr un llyfr gwaith, gallwch gymhwyso'r swyddogaeth Cydgrynhoi yn Excel.

1. Mewn dalen newydd o'r llyfr gwaith rydych chi am gasglu data o daflenni, cliciwch Dyddiad > Cyfnerthu.
doc casglu taflenni yn un 1

2. Yn y Consolidate deialog, gwnewch fel y rhain:

(1 Dewiswch un gweithrediad rydych chi am ei wneud ar ôl cyfuno'r data ynddo swyddogaeth rhestr ostwng;

(2 Cliciwch botwm dewis doc i ddewis ystod pob dalen rydych chi am ei chasglu;

(3 Cliciwch Add botwm i ychwanegu'r ystod ddata i'r All references blwch rhestr;

(4 Gwiriwch y labeli rydych chi'n eu defnyddio ar ôl cyfuno data, a gwirio Create links to source data opsiwn os ydych chi am gysylltu'r data mewn taflen gyfuno â data ffynhonnell.
doc casglu taflenni yn un 2

3. Cliciwch OK. Nawr mae'r data wedi'u casglu a'u crynhoi mewn un ddalen.
doc casglu taflenni yn un 3


Cyfuno sawl taflen / llyfr gwaith yn hawdd mewn un ddalen sengl neu lyfr gwaith

Er mwyn cyfuno lluosrifau neu lyfrau gwaith yn un ddalen neu lyfr gwaith, gall fod yn ddifyr yn Excel, ond gyda'r Cyfunwch swyddogaeth yn Kutools ar gyfer Excel, gallwch gyfuno uno dwsinau o daflenni / llyfrau gwaith yn un ddalen neu lyfr gwaith, hefyd, gallwch gydgrynhoi'r dalennau yn un wrth sawl clic yn unig.  Cliciwch ar gyfer treial llawn sylw 30 diwrnod am ddim!
cyfuno taflenni
 
Kutools ar gyfer Excel: gyda mwy na 300 o ychwanegion Excel defnyddiol, am ddim i geisio heb unrhyw gyfyngiad mewn 30 diwrnod.

Casglu data o daflenni lluosog i mewn i un gyda chod VBA

Dyma god VBA yn gallu casglu data o bob dalen mewn dalen newydd yn y llyfr gwaith cyfredol.

1. Gwasgwch Alt + F11 allwedd i alluogi'r Microsoft Visual Basic for Applications ffenestr.

2. Cliciwch Insert > Module, a chopïo a gludo islaw'r cod i'r Module sgript.

VBA: Casglwch yr holl ddata o daflenni yn un.

Sub Combine()
'UpdatebyExtendoffice20180205
    Dim I As Long
    Dim xRg As Range
    On Error Resume Next
    Worksheets.Add Sheets(1)
    ActiveSheet.Name = "Combined"
   For I = 2 To Sheets.Count
        Set xRg = Sheets(1).UsedRange
        If I > 2 Then
            Set xRg = Sheets(1).Cells(xRg.Rows.Count + 1, 1)
        End If
        Sheets(I).Activate
        ActiveSheet.UsedRange.Copy xRg
    Next
End Sub
doc collect sheets into one 4

3. Press F5 key to run the code, all data of the whole workbook has been collected in the new sheet Combined.
doc collect sheets into one 5


Collect data from multiple sheets into one with powerful Combine function

If you usually need to combine sheets into one, I introduce one powerful combine function for you, it’s Kutools for Excel’s Combine utility which have below four main functions:

Combine multiple worksheets from workbook into one worksheet

Combine all same name worksheets into one worksheet

Combine multiple worksheets from workbooks into one workbook

Consolidate and calculate values across multiple workbooks into one worksheet

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing Kutools for Excel, please do as below:

If you just want to combine sheets into one sheet without any other operations, you can do as these:

1. Enable Excel, click Kutools Plus > Combine, there is one or two dialogs pop out to remind you some notices, just click OK and Yes to continue. See screenshot:

2. Click OK to go to the Combine window, check Combine multiple worksheets from workbook into worksheet option.

3. Click Next, then click Add > File / Folder to add workbooks you will use to combine into the Workbook list. Then go to Worksheet list to check the sheets you want to combine form each workbooks.

4. Click Next to go to the last step, you can specify some setting about the combine result as you need. If you do not need this step.

5. Click Finish and select one folder to place the new workbook which combine data from sheets.
doc collect sheets into one 13

6. Click Save. Now all data has been collected from sheets across workbook into one master sheet.
doc collect sheets into one 14

If you want to consolidate worksheets across workbooks into one, do as these:

1. In the Combine window, check Consolidate and calculate values across multiple worksheets into one worksheet option.

2. Click Next, and add files into Workbook list, then check the sheets you use to combine and calculate.

3. Click Next, then select one calculation from Function drop down list, and check other options as you need.

4. Click Finish to save the new workbook into a folder.

Now the sheets across workbooks have been consolidated and calculated into one sheet.
doc collect sheets into one 18


Kutools for Excel: 300 functions you must have in Excel, 30-day free trial from here.

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (8)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
De que forma se puede obtener solo el valor de las hojas y llevarla a la hoja que se va a resumir todo, por ejemplo, en caso de que una hoja de las que se van a combinar exista una celda calculada o que dependa de otra hoja, por eso pregunto si se puede llevar solo los valores.
This comment was minimized by the moderator on the site
Sorry, could you repeat your quetion in English?
This comment was minimized by the moderator on the site
How do you make your VBA overwrite the compiled data onto the same master list, rather than add a new sheet?
This comment was minimized by the moderator on the site
hmm your VBA code removes the last row from individual sheet when combined .. any idea how to solve this issue?
This comment was minimized by the moderator on the site
any answer for this?
This comment was minimized by the moderator on the site
Hi,
I'm trying to accomplish the following:
Get data from multiple tabs in a specific cell range (B3-E169).
Data would be compiled in columns...i.e., column B copies into column B on new spreadsheet, column C copies into column C on new spreadsheet, etc.
If there are more than two blank columns in B, stop & move onto next worksheet and get same data.
The result that I'm trying to get is a material list from different categories (hence the different tabs).

This is how I think it should work:
Lookup WS1 column B3-B169.
If two blank columns, Lookup WS2 column B3-B169,
If two blank columns, Lookup WS3 column B3-B169, etc.

WS2 should skip a space/column & come in underneath WS1.
WS3 should skip a space/column & come in underneath WS2,.etc.

Repeat or columns C, D & E
This comment was minimized by the moderator on the site
The VBA code works perfectly! , how can i edit it so it skips the first page in my workbook and merges the remaining pages?
This comment was minimized by the moderator on the site
Thanks for the VBA code - it works well! How can I extend the code so that when the sheets are combined that they are combined as values? I am running into some issues with circular reference issues when I try to interact with the combined sheet.
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations