In this tutorial we will show you how to consolidate multiple worksheets into a Pivot table using Excel.
If the data is arranged properly, then you can do that.
Most of the time when you create a Pivot table in Excel 2013 or Excel 2016, you'll use a data list, or an Excel table.
There might be some different worksheets (or workbooks) that you have in your collection with data arranged differently, but you'll still want to create a pivot table.
Mar 21, 2021 Just follow the step by step guide below to successfully combine data from various worksheets: Click on the Data tab. Just below the Data tab, click on New Query then choose From Other Sources in options. You will then be able to import. When you've entered the From Other Sources section, click on. Each Excel workbook is having 3 worksheets. Lets say WorkBook1 is having Sheet1, Sheet2, Sheet3. Workbook2 is having Sheet1, Sheet2, Sheet3. So here I need to merge these two excel workbook into one and the new excel workbook that is let's say Workbook3 which will have total 6 worksheets (combination of workbook1 and workbook2). In the second Combine Worksheets window, click Add File or Folder to open the Open dialog, then select the workbook you want to combine all sheets into one. Then check the workbook in Workbook list pane you have added just now, go to the right section of Worksheet list pane, confirm the sheets you want to combine into one are checked.
If the data is arranged properly, then you can do that. In this tutorial, we will use the consolidating sample file. You can download from here.
The workbook contains four worksheets, and all those worksheets are data collections that you can use to combine into a Pivot Table.
On the Team1 worksheet, you can see that there is a rectangular region of data; it starts here in cell B3, and runs down the cell F7.
[adinserter block='2″]
It's very important that your data be in a perfect rectangle.
Here comes a non-regtangular data sample. If we were to have Product in cell B2, and Year in cell C2, the data values would not be perfectly rectangular.
In this case the Pivot table consolidation technique will not work.
Further information: We need to make sure that there are no blank cells anywhere in our data table.
This data summarizes yearly sales for 4 years (from 2013 to 2016); the years are along the top and the row labels are along the side.
We will use four worksheets. Team1, Team2, Team3 and Team4 tabs contain similar data.
OK, go to the Team1 worksheet and now we can open the tool named the Pivot Table Wizard.
Our goal to consolidate multiple worksheets into a pivot table.
Bad news: The Pivot Table Wizard is no available on the ribbon. We have to use a smart keyboard shortcut to display it. The key combination what we need to use this tool the following.
Consolidate Multiple Worksheets using the Pivot Table Wizard
First press Alt+D, then press P.
Excel displays the The Pivot Table Wizard dialog box.
A short summary of data tables before we consolidate the worksheets: Sames ranges, same shapes and same labels are required to combine datasets into a pivot table.
Now check the Multiple consolidation ranges option.
We can create a pivot table report that uses ranges from one or more worksheets, and that has no no page fields or up to four page fields.
Page fields are fields that are used to filter the contents of a Pivot Table.
We will create the page fields option, then click Next.
Now you can identify the ranges that you want to consolidate.
To do that, click the collapse dialog button at the right side of the Range box.
It is important to make sure that the insertion point is flashing inside the Range box.
Choose the collapse dialog button, and select the first set of cells.
Those are on the Team1 worksheet. Now we will select from B2 to F7. Expand the dialog box, and then click Add.
Doing so adds that range to the All Ranges pane.
Now we have to do the same thing for the other three worksheets.
Click the collapse dialog box button. Click the Team2 sheet tab, select cells B3 to F7, expand the dialog box, and click Add.
Finally repeat these steps for Team 3 and Team4 worksheet.
Datasets are the same size, and the exact same shape.
We have identified the consolidation ranges. The next task is to specify how many page fields we want.
In this example, select 0.
Click Next, and we can select where to create the new pivot table.
We are done, click Finish!
How to modify the pivot table row and column labels?
Doing so creates a pivot table with the values that are all consolidated into a pivot table from our four worksheets.
If you look over in the Pivot Table Fields pane at the right corner of the main window, you'll see that we have three fields.
They are called Row, Column, and Value.
Value is ok, further explanation is not necessarry.
But Row and Column aren't terribly descriptive. We will modify the name of those fields.
To do that, click a value in the Row Labels area, and then on the Analyze contextual tab of the ribbon, which is already selected.
Now we will modify the value in the Active Field box.
It currently says Row, and clicking in the box selects it.
These are the products so we will type in Product, and press Enter. Doing so changes the name of the field in the pivot table fields pane.
Do the same thing for Column! Click one of the Column Labels, and again, on the Analyze tab. We can edit the value in the Active Field box.
Type Year that, and press Enter.
Enter, and the value changes.
Get our data from Pivot table using drill down technique
Click the Sheet1 sheet tab to go back to the pivot table. You can create an Excel table based on this data by using a drill down technique.
The first thing you need to do is remove all field headers from the Rows and Columns area, so that you're left with just the Grand Total in the Value area, so it should be a single cell.
Here is the result:
Now, to create the Excel table, double-click that cell; in this case, it's cell A4. Doing so creates an Excel table that contains a list of all of your data.
So, we have Product A for the year 2013, the value; Product A for the year 2014 with a value, and so on.
Conlusion
If you are in hurry we strongly recommend our free excel add-in. It's not a complex task to consolidate multiple worksheets into a Pivot table and prepare data to createdashboard templates. We have to use same shapes for data sets. Using the drill down method our life will be easier.
Check our tutorial on YouTube!Download the sample workbook!
Additional resources:
In this article, we will learn How to concatenate or merge in Excel.
What is Concatenate in Excel?
In General, there are two ways to combine data in Excel spreadsheets:
Merge cells
Concatenate cell values
CONCATENATION in Excel
How to use the CONCATENATE function Excel
The CONCATENATE function in Excel is designed to join different pieces of text together or combine values from several cells into one cell.
The syntax of Excel CONCATENATE is as follows:
CONCATENATE(text1, [text2], …) |
Where text is a text string, cell reference or formula-driven value.
Examples:
Concatenating the values of several cells
The simplest CONCATENATE formula to combine the values of cells A1 and B1 is as follows:
How To Merge Two Excel Spreadsheets
=CONCATENATE(A1, B1) |
Please note that the values will be knit together without any delimiter, as in row 2 in the screenshot below.
To separate the values with a space, enter ' ' in the second argument, as in row 3 in the screenshot below.
=CONCATENATE(A1, ' ', B1) |
To separate the concatenated values with other delimiters such as a comma, space or slash, please see Excel CONCATENATE formulas with special characters.
Concatenating a text string and cell value
There is no reason for the Excel CONCATENATE function to be limited to only joining cells' values. You can also use it to concatenate various text strings to make the result more meaningful. For example:
=CONCATENATE(A1, ' ', B1, ' completed') |
The above formula informs the user that a certain project is completed, as in row 2 in the screenshot below. Please notice that we add a space before the word ' completed' to separate the concatenated text strings.
Naturally, you can add a text string in the beginning or in the middle of your Concatenate formula as well:
=CONCATENATE('See ', A1, ' ', B1) |
A space (' ') is added in between the combined values, so that the result displays as 'Project 1' rather than 'Project1'.
Concatenating a text string and a formula-calculated value. To make the result returned by some formula more understandable for your users, you can concatenate it with a text string that explains what the value actually is.
For example, you can use the following formula to return the current date:
=CONCATENATE('Today is ',TEXT(TODAY(), 'dd-mmm-yy')) |
Using CONCATENATE in Excel - things to remember
To ensure that your CONCATENATE formulas always deliver the correct results, remember the following simple rules:
Excel CONCATENATE function requires at least one 'text' argument to work.
In a single CONCATENATE formula, you can concatenate up to 255 strings, a total of 8,192 characters.
The result of the CONCATENATE function is always a text string, even when all of the source values are numbers.
Excel CONCATENATE does not recognize arrays. Each cell reference must be listed separately. For example, you should write =CONCATENATE(A1, A2, A3) instead of =CONCATENATE(A1:A3).
If at least one of the CONCATENATE function's arguments is invalid, the formula returns a #VALUE! error.
Now, to create the Excel table, double-click that cell; in this case, it's cell A4. Doing so creates an Excel table that contains a list of all of your data.
So, we have Product A for the year 2013, the value; Product A for the year 2014 with a value, and so on.
Conlusion
If you are in hurry we strongly recommend our free excel add-in. It's not a complex task to consolidate multiple worksheets into a Pivot table and prepare data to createdashboard templates. We have to use same shapes for data sets. Using the drill down method our life will be easier.
Check our tutorial on YouTube!Download the sample workbook!
Additional resources:
In this article, we will learn How to concatenate or merge in Excel.
What is Concatenate in Excel?
In General, there are two ways to combine data in Excel spreadsheets:
Merge cells
Concatenate cell values
CONCATENATION in Excel
How to use the CONCATENATE function Excel
The CONCATENATE function in Excel is designed to join different pieces of text together or combine values from several cells into one cell.
The syntax of Excel CONCATENATE is as follows:
CONCATENATE(text1, [text2], …) |
Where text is a text string, cell reference or formula-driven value.
Examples:
Concatenating the values of several cells
The simplest CONCATENATE formula to combine the values of cells A1 and B1 is as follows:
How To Merge Two Excel Spreadsheets
=CONCATENATE(A1, B1) |
Please note that the values will be knit together without any delimiter, as in row 2 in the screenshot below.
To separate the values with a space, enter ' ' in the second argument, as in row 3 in the screenshot below.
=CONCATENATE(A1, ' ', B1) |
To separate the concatenated values with other delimiters such as a comma, space or slash, please see Excel CONCATENATE formulas with special characters.
Concatenating a text string and cell value
There is no reason for the Excel CONCATENATE function to be limited to only joining cells' values. You can also use it to concatenate various text strings to make the result more meaningful. For example:
=CONCATENATE(A1, ' ', B1, ' completed') |
The above formula informs the user that a certain project is completed, as in row 2 in the screenshot below. Please notice that we add a space before the word ' completed' to separate the concatenated text strings.
Naturally, you can add a text string in the beginning or in the middle of your Concatenate formula as well:
=CONCATENATE('See ', A1, ' ', B1) |
A space (' ') is added in between the combined values, so that the result displays as 'Project 1' rather than 'Project1'.
Concatenating a text string and a formula-calculated value. To make the result returned by some formula more understandable for your users, you can concatenate it with a text string that explains what the value actually is.
For example, you can use the following formula to return the current date:
=CONCATENATE('Today is ',TEXT(TODAY(), 'dd-mmm-yy')) |
Using CONCATENATE in Excel - things to remember
To ensure that your CONCATENATE formulas always deliver the correct results, remember the following simple rules:
Excel CONCATENATE function requires at least one 'text' argument to work.
In a single CONCATENATE formula, you can concatenate up to 255 strings, a total of 8,192 characters.
The result of the CONCATENATE function is always a text string, even when all of the source values are numbers.
Excel CONCATENATE does not recognize arrays. Each cell reference must be listed separately. For example, you should write =CONCATENATE(A1, A2, A3) instead of =CONCATENATE(A1:A3).
If at least one of the CONCATENATE function's arguments is invalid, the formula returns a #VALUE! error.
'&' operator to concatenate strings in Excel
In Microsoft Excel, & operator is another way to concatenate cells. This method comes in very handy in many scenarios because typing the ampersand sign (&) is much quicker than typing the word 'concatenate' 🙂
Similarly to the CONCATENATE function, you can use '&' in Excel to combine different text strings, cell values and results returned by other functions.
Excel '&' formula examples
To see the concatenation operator in action, let's rewrite the CONCATENATE formulas discussed above:
Concatenate the values in A1 and B1:
=A1&B1
Concatenate the values in A1 and B1 separated with a space:
=A1&' '&B1
Concatenate the values in A1, B1 and a text string:
=A1 & B1 & ' completed'
Concatenate a string and the result of the TEXT / TODAY function:
='Today is ' & TEXT(TODAY(), 'dd-mmm-yy')
As demonstrated in the screenshot below, the CONCATENATE function and '&' operator return identical results:
Excel '&' operator vs. CONCATENATE function
Many users wonder which is a more efficient way to concatenate strings in Excel - CONCATENATE function or '&' operator.
The only essential difference between CONCATENATE and '&' operators is the 255 strings limit of the Excel CONCATENATE function and no such limitations when using the ampersand. Other than that, there is no difference between these two concatenation methods, nor is there any speed difference between the CONCATENATE and '&' formulas.
And since 255 is a really big number and in real-life tasks someone will hardly ever need to combine that many strings, the difference boils down to the comfort and ease of use. Some users find CONCATENATE formulas easier to read, I personally prefer using the '&' method. So, simply stick to the concatenation technique that you feel more comfortable with.
Concatenate cells with a space, comma and other characters
In your worksheets, you may often need to join values in a way that includes commas, spaces, various punctuation marks or other characters such as a hyphen or slash. To do this, simply include the character you want in your concatenation formula. Remember to enclose that character in quotation marks, as demonstrated in the following examples.
Concatenating two cells with a space:
=CONCATENATE(A1, ' ', B1) or =A1 & ' ' & B1
Concatenating two cells with a comma:
=CONCATENATE(A1, ', ', B1) or =A1 & ', ' & B1
Concatenating two cells with a hyphen:
=CONCATENATE(A1, '-', B1) or =A1 & '-' & B1
The following screenshot demonstrates how the results may look like:
Concatenate text strings with line breaks
Most often, you would separate the concatenated text strings with punctuation marks and spaces, as shown in the previous example. In some cases, however, may need to separate the values with a line break, or carriage return. A common example is merging mailing addresses from data in separate columns.
A problem is that you cannot simply type a line break in the formula like a usual character, and therefore a special CHAR function is needed to supply the corresponding ASCII code to the concatenation formula:
On Windows, use CHAR(10) where 10 is the ASCII code for Line feed.
On the Mac system, use CHAR(13) where 13 is the ASCII code for Carriage return.
In this example, we have the address pieces in columns A through F, and we are putting them together in column G by using the concatenation operator '&'. The merged values are separated with a comma (', '), space (' ') and a line break CHAR(10):
=A2 & ' ' & B2 & CHAR(10) & C2 & CHAR(10) & D2 & ', ' & E2 & ' ' & F2 |
Note. When using line breaks to separate the concatenated values, you must have the 'Wrap text' option enabled for the result to display correctly. To do this, press Ctrl + 1 to open the Format Cells dialog, switch to the Alignment tab and check the Wrap text box.
In the same manner, you can separate concatenated strings with other characters such as:
Double quotes (') - CHAR(34)
Forward slash (/) - CHAR(47)
Asterisk (*) - CHAR (42)
The full list of ASCII codes is available
Though, an easier way to include printable characters in the concatenation formula is to simply type them in double quotes as we did in the previous example.
How To Merge 2 Worksheets In Excel
Either way, all four of the below formulas yield identical results:
Use any one of the below mentioned formulas:
=A1 & CHAR(47) & B1 =A1 & '/' & B1 =CONCATENATE(A1, CHAR(47), B1) =CONCATENATE(A1, '/', B1) |
How to concatenate columns in Excel
In order to concatenate two or more columns in Excel, you just enter a usual concatenation formula in the first cell, and then copy it down to other cells by dragging the fill handle (the small square that appears in the lower right hand corner of the selected cell).
For example, to concatenate two columns (column A and B) separating the values with a space, you enter the following formula in cell C2, and then copy it down to other cells. When you are dragging the fill handle to copy the formula, the mouse pointer changes to a cross, as shown in the screenshot below:
Note : A quick way to copy the formula down to other cells in the column is to select the cell with the formula and double-click the fill handle.
Please note that Microsoft Excel determines how far to copy cells after the fill handles double click based on the cells referred to by your formula. If there happen to be empty cells in your table, say cell A6 and B6 were blank in this example, the formula would be copied up to row 5 only. In this case, you would need to drag the fill handle down manually to concatenate the entire columns.
An alternative way to concatenate columns in Excel is to use the corresponding option of the Merge Cells add-in.
How to concatenate a range of cells in Excel
Combining values from multiple cells might take some effort because the Excel CONCATENATE function does not accept arrays and requires a single cell reference in each argument.
To concatenate several cells, say A1 to A4, you need either of the following formulas:
=CONCATENATE(A1, A2, A3, A4) or =A1 & A2 & A3 & A4 |
When joining a fairly small range, it's no big deal to enter all the references in the formula bar. A large range would be tedious to add, typing each cell reference manually. Below you will find 3 methods of quick range concatenation in Excel.
Method 1. Press CTRL to select multiple cells to be concatenated.
To quickly select several cells, you can press the CTRL key and click on each cell you want to include in the CONCATENATE formula. Here are the detailed steps:
- Select a cell where you want to enter the formula.
- Type =CONCATENATE( in that cell or in the formula bar.
- Press and hold Ctrl and click on each cell you want to concatenate.
- Release the Ctrl button, type the closing parenthesis in the formula bar and press Enter.
Method 2. Use the TRANSPOSE function to get the range
When you need to concatenate a huge range consisting of tens or hundreds of cells, the previous method is not fast enough because it requires clicking on each cell. In this case, a better way is to use the TRANSPOSE function to return an array, and then replace it with individual cell references in one fell swoop.
In the cell where you want to output the concatenated range, enter the TRANSPOSE formula, for example:
=TRANSPOSE(A1:A10)
In the formula bar, press F9 to replace the formula with calculated values. As a result, you will have an array of numbers to be concatenated.
Type =CONCATENATE( before the first value, then type the closing parenthesis after the last value, and press Enter.
Note : Whichever method you use, the concatenated value in C1 is a text string (notice its left-alignment in the cell), although each of the original values is a number. This is because the CONCATENATE function always returns a text string regardless of the source data type.
Method 3. Use the Merge Cells add-in
A quick and formula-free way to concatenate any range in Excel is to use the Merge Cells add-in for Excel with the 'Merge all areas in selection' option turned off, as demonstrated in Combine the values of several cells into one cell.
Concatenate numbers and dates in various formats
When you concatenate a text string with a number or date, you may want to format the result differently depending on your dataset. To do this, embed the TEXT function in your Excel concatenate formula.
The TEXT(value, format_text) function has two arguments:
In the first argument (value), you supply a number or date to be converted to text, or a reference to the cell containing a numeric value.
In the second argument (format_text), you enter the desired format using the codes that the TEXT function can understand.
We have already discussed one such formula in the beginning of this tutorial that concatenates text and date.
I will remind you that when combining a text string and date, you have to use the TEXT function to display the date in the desired format. For example:
=CONCATENATE('Today is ', TEXT(TODAY(), 'mm/dd/yy')) or ='Today is ' & TEXT(TODAY(), 'mm/dd/yy') |
A few more formula examples that concatenate a text value and number follow below:
=A2 & ' ' & TEXT(B2, '$#,#0.00') - display the number with 2 decimal places and the $ sign. =A2 & ' ' & TEXT(B2, '0.#') - does not display extra zeros and the $ sign. =A2 & ' ' & TEXT(B2, '# ?/???') - display the number as a fraction. |
How to split cells (opposite of CONCATENATE in Excel)
If you are looking for the opposite of CONCATENATE in Excel, i.e. you want to split one cell into several cells, a few options are available to you:
Text to Columns feature
Flash Fill option in Excel 2013 and 2016
Formulas (MID, RIGHT, LEFT functions)
You can find the detailed steps illustrated with formula examples and screenshots in the How to split cells in Excel tutorial.
Merge Cells add-in - formula-free way to concatenate cells in Excel
With the Merge Cells add-in included in Ultimate Suite for Excel, you can efficiently do both:
Merge several cells into one without losing data.
Merge 2 Sheets In Excel
Concatenate the values of several cells into a single cell and separate them with any delimiter of your choosing.
The Merge Cells tool works with all Excel versions from 2003 to 2016 and can combine all data types including text strings, numbers, dates and special symbols. Its two key advantages are simplicity and speed - any concatenation is done in a couple of clicks. And now, let me show it to you in action.
Combine the values of several cells into one cell
To combine the contents of several cells, you select the range to concatenate and configure the following settings:
Cells into one under 'What to merge';
Select the delimiter you want under 'Separate values with', it's a comma and a space in this example;
Choose where you want to place the result, and most importantly
Can You Consolidate Excel Sheets
Uncheck the 'Merge all areas in the selection' option. It is this option that determines whether the cells are merged or the cells' values are concatenated.
Combine columns row-by-row
To concatenate two or more columns, you configure the Merge Cells' settings in a similar way, but choose Columns under 'What to merge':
Join rows column-by-column
To combine data in each individual row, column-by-column, you choose to merge Rows, select the delimiter you want (line break in this example), configure other settings the way you want and hit the Merge button. The result may look similar to this:
Note :
In Excel 2016, Excel 2019, Excel Online and Excel Mobile, CONCATENATE is replaced with the CONCAT function, which has exactly the same syntax. Although the CONCATENATE function is kept for backward compatibility, it is recommended to use CONCAT instead because Microsoft does not give any promises that CONCATENATE will be available in future versions of Excel.
Hope this article about How to concatenate or merge in Excel is explanatory. Find more articles on calculating values and related Excel formulas here. If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at info@exceltip.com.
Related Articles :
Excel REPLACE vs SUBSTITUTE function: The REPLACE and SUBSTITUTE functions are the most misunderstood functions. To find and replace a given text we use the SUBSTITUTE function. Where REPLACE is used to replace a number of characters in string…
Popular Articles :
50 Excel Shortcuts to Increase Your Productivity : Get faster at your tasks in Excel. These shortcuts will help you increase your work efficiency in Excel.
How to use the VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.
How to use the IF Function in Excel : The IF statement in Excel checks the condition and returns a specific value if the condition is TRUE or returns another specific value if FALSE.
Consolidate Worksheets In Excel 2016
How to use the SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.
Merge 2 Excel Sheets Together
How to use the COUNTIF Function in Excel : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.