Different Grouping For Multiple Pivot Tables Based on Same DataSet

One of the key features of Pivot Tables is to summarize the information quickly. Another great advantage is its ability to look at percentages – percent of total, percent of grand total, percent of row total, running total in etc.

Yet another fantastic feature is the ability to group data in Excel – either by existing columns, or by creating your own custom logic. Data can be grouped by Text Columns or even Date Columns. And the result is instantly summarized. Amazing stuff!

All is good so far… The problem crops up when you have created some grouping, and then decide to build another pivot table to get another view of the same data, while keeping the original pivot table in place.

The second pivot table automatically groups the data based on the first pivot’s grouping. And if you change the grouping on the second pivot, the first pivot table changes too.. Bo hoo hoo 🙁

This can be frustrating and sometimes difficult to troubleshoot or fix.

Why does a Pivot Table share its Grouping with another Pivot Table?

That’s because both the pivot tables are sharing the same pivot cache. To understand better, when Excel creates a pivot table, it makes a copy of the entire source data, and creates a temporary pivot cache in the memory. This duplicated cache is now stored with the Excel file, doubling its size. If your source data was huge, the excel file soon soars in size too.

To save hard drive space and memory, when the second pivot table was created, it used the same cache as the first pivot table. This makes sense, but then since the cache is shared, change in the cache for one pivot table affects the other pivot table too.

The solution is to have a separate pivot cache for the second pivot table.

How to Create a Separate Cache for the Second Pivot Table?

Although this method will use up more memory, it is a good solution, works well, and hardly takes any time to implement.

Select the source data, go to the Formulas tab, and click on Define Name button.

Key in a unique name in the popup. Let’s say you call this DataSet1. This creates a Unique Named Range.

Now click on the Define Name button once more, and create another name for the same data set. Let’s call this DataSet2.

Create Pivot Tables with Unique Data Sets

Now create the first pivot table based on the first Data set (DataSet1). Group on whatever fields you want. Once you are happy with the result, do the same thing for the second pivot table.

Just remember to use the second data set for the second pivot table (DataSet2). Group the data on a different field.

Want to Improve Your Excel Skills?

Learn the Key Features of Excel Quickly & Easily, by Joining the
Online Training on Basic / Intermediate Excel.

To Get Most out of Excel, Learn the  Pivot Table techniques in our
Pivot Table Masterclass Training
!


You will notice that the grouping of the second table stays, and it does not alter the grouping order of the first pivot table. That’s because we are using different defined names.

Thus, Excel creates two different pivot caches, and even though both refer to the same data set, it is transparent to Excel, and is of no consequence.

Now you can enjoy the benefits of two different views, one with one set of grouping, and another with another set of grouping.

Although this method inflates the size of the file, it is a quick and dirty method, that works well. Try it out… and let me know how it goes…

Cheers,Vinai Prakash,
Founder of ExcelChamp.Net

Additional Resources:
If you found this tip useful, you may want to subscribe to the ExcelChamp Weekly Excel Tips Newsletter.

And check out these cool Excel Tips too…

Cheers – Vinai

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!

How to Replace Blanks With Any Value or Zeros in Excel

This is a common problem. You import some text file, and half of it seems blank. The problem is that if it is showing blanks, you can’t sum the values.

To replace each blank with a zero is time consuming, boring and stupid. We want a fast method that works in just a few clicks, and saves us loads of time for our families 🙂

There are many ways to achieve this task of replacing Blank with Zeroes, or Replacing Blanks with Any Other Values in Excel.

Method 1: Use the GoTo Method to Find & Replace

Click on Home > Find & Select > GoTo Special. This will open up a new popup window.

Go To Special Popup in Excel
GoTo Special menu – Select Blanks

Choose Blanks Radio Button, and Click OK.

All the Blank Cells will get highlighted. Do not worry. Simply type a Zero or any other value that you want to put in the blank cells.

Do this in the currently active cell. Press

together.

Voila! The keyed in Values is showing in all the Blank Cells now.

Method 2: Use an IF condition

For example, if you want to selectively key in 0 for blanks, key in this formula below.=IF(A2=””,0,A2)

This formula checks if the cell A2 is blank or not. IF it is blank, it will replace it with a 0, or else it will not change it.

Once done, you can drag the formula to the selected cells. Works beautifully!

Want to Improve Your Excel Skills?

Learn the Key Features of Excel Quickly & Easily, by Joining the
Online Training on Basic / Intermediate Excel.

To Get Most out of Excel, Learn the  Pivot Table techniques in our
Pivot Table Masterclass Training
!


Method 3: Variation of the IF Method, using the ISBLANK function

Now we have an in-built function that can check if the cell ISBLANK or not.

=IF(ISBLANK(A2),0,A2)

Same Magic!

If you have any other favorite method, do share it with us below in the comments!

If you’d like to learn more Excel Shortcuts, Tips &  Tricks, here are some additional articles:

Questions About Any Feature in Excel?

If you have any questions regarding any feature in Excel, simply post a comment below and I’ll help you with it. All the best!

And Subscribe to our Weekly Excel Tips Newsletter, so we can send you more Short cuts & some Pivot Table Techniques by email. Only useful stuff, without the hype. And we won’t spam you. So don’t worry. Just subscribe!

Cheers,
Vinai Prakash, PMP, ITIL, GAP, Six Sigma
Founder of ExcelChamp.Net

Vinai conducts 1-2 day seminars and Training Sessions on Microsoft Excel all over the world, helping companies maximize their productivity in using Microsoft Excel. If you would like to find out more, simply contact us.

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!

Removing Duplicate Values in Excel

As soon as you begin working with a larger set of data, this problem of having duplicate values begins to creep in.

And it is most difficult to pick up duplicates. You can use this technique  to identify duplicates in Excel. The duplicate values will be highlighted in yellow.

data with duplicates
Data Showing Duplicate Values

But you may not only want to find the duplicates… you actually want to eliminate them completely. In this case, read on, and find how to remove the duplicate values.

First Method: How to Remove Duplicate Cells in Excel

In Excel 2003 and previous versions of Excel, it was extremely frustrating to delete duplicates. You had to write a complex formula, to identify the duplicates first, and then delete them manually or through a macro or a series of steps.

Starting from Microsoft Excel 2007, and continuing in Excel 2010 & Excel 2013, there is a dedicated button on the Data tab, called Remove Duplicates.

Remove Duplicates Button on Data tab in Excel 2010
Remove Duplicates Button on Data tab in Excel 2010

All you need to do is to highlight the row of cells which contain the duplicates, and click on the Remove Duplicates button on the Data tab.

Excel will popup a window to ask about the column, and whether headers exist.

Remove Duplicates Popup
Remove Duplicates Popup

Once you click OK, the duplicates are removed, and you are shown another popup informing you of the duplicates removed, and the number of unique values remaining.

Duplicates Removed. Unique Values Remaining
Duplicates Removed. Unique Values Remaining

The Resulting data set only has unique values.

Data without Duplicates. only unique values remain
Data without Duplicates.

Do keep in mind that when a duplicate values is found, the first occurrence is considered original, and the second instance is removed. Any other occurrences are also removed. Only the first unique value would remain.

This is a quick and simple way to remove duplicates in Excel.

Want to Improve Your Excel Skills?

Learn the Key Features of Excel Quickly & Easily, by Joining the
Online Training on Basic / Intermediate Excel.

To Get Most out of Excel, Learn the  Pivot Table techniques in our
Pivot Table Masterclass Training
!


Second Method: Convert Data Range into a Data Table

If you convert your data into a table, you can use a lot of in-built functionality that only emerged in Excel 2007 onwards.

You can press Control + T to convert a data set into a Table.

Once the data is converted into a Table, you will see a new Tab called Table Tools appear in the Menu bar, at the end of the menu set.

Table Tools Menu
Table Tools Menu

Click on it, to activate the Table Tools Menu.

With the table tools menu, you have another option to Remove Duplicates, which works pretty much the same way as the first method.

The great thing is that the entire duplicate data set is removed completely. The remaining data moves up, and you don’t end up with any blank rows.  Thus, no cleanup is required after the duplicate removal.

With these methods, you can remove duplicates, and you can have a clean set of data to perform further data analysis.

Let me know if you use any other methods to identify or remove duplicates.

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!


Additional Resources:

Cheers,
Vinai Prakash
Founder  of ExcelChamp.Net

Microsoft Excel Shortcuts

Make life simpler with these short cut keys in Microsoft Excel. Save Time & Increase Productivity!

Ever since I wrote about how to view all the formulas in Excel using a single click, I have been requested for more such Excel Shortcuts that save time. So here goes… There are some absolute gems that have been my favorite for years!

Shortcuts that work inside Excel Worksheets

  • Ctrl + F: Display the Find & Replace Dialog box, with Find selected
  • Shift + F4: Repeat Last Find
  • Ctrl + Z: Undo last action. Works for multiple levels
  • Ctrl + Y: Redo last action.
  •  F11: Create and Insert a Chart based on the selected data. Chart is added in a separate sheet.
  • Alt + F1: Creates a inserts a chart based on the currently selected data as an embedded chart object.
  • Ctrl + K: Insert a Hyperlink in a cell

Format Cells

  • Ctrl + 1: Format Cells Dialog box
  • Ctrl + 2: Apply or remove Bold formatting. Also works as Ctrl + B
  • Ctrl + 3: Apply Italic formatting to selected text
  • Ctrl + 4: Underline or remove the underline from the selected data. Also works as Ctrl + U

Apply Number Formatting

  • Ctrl + Shift + $: Apply Currency format with 2 decimal points
  • Ctrl + Shift + ~: Apply the General number format
  • Ctrl + Shift + %: Apply the Percentage format with no decimal places at all.
  • Ctrl + Shift + #: Apply the date format with full day, month and year showing.
  • Ctrl + Shift + @: Apply the time format with hours, minutes, AM or PM showing.
  • Ctrl + Shift + !: Apply the number format with two decimal places, a comma separator for the thousands place, and a minus sign for negative numbers.
  •  

    Want to Improve Your Excel Skills?

    Learn the Key Features of Excel Quickly & Easily, by Joining the
    Online Training on Basic / Intermediate Excel.

    To Get Most out of Excel, Learn the  Pivot Table techniques in our
    Pivot Table Masterclass Training
    !

 Shortcuts for Formulas

  • Alt + =: Auto sum formula is inserted
  • Shift + F3: Insert Function dialog box is opened
  • F4: Cycle through the four states of Relative referencing (A1) to Absolute referencing ($A$1)
  • Ctrl + Shift + Enter: Enter an Array Formula
  • F9: Calculates all the worksheets in all open workbooks
  • Ctrl + `: Shows all formulas. Toggle switch that shows and hides the formulas. If you can’t find the key, you can locate it just above the left Tab key. My favorite shortcut.
  • F2: Edit the formula or selection in any cell
  • F3: Paste a defined name into a formula. Using Range Names.
  • Ctrl + F3: Define a range name for a single cell or a range of cells.

Managing Workbooks

  • Ctrl + F4: Close the currently selected workbook window.
  • Ctrl + N: Open a New and blank workbook in Excel
  • Ctrl + Tab: Move to the Next Worksheet within the workbook.
  • Ctrl + Shift + Tab: Move to the Previous worksheet within the same workbook
  • Ctrl + F9: Minimize the current workbook
  • Ctrl + F10: Restore the selected workbook into a full window
  • F12: Save As diaglog box to save the workbook
  • F7: Do a Spell check in Excel
  • F1: Ask for Help ( internal Excel in built help pops up)
  • Shift + F7: Display the Thesaurus
  • Alt + F8: Displays the macro dialog box
  • Alt + F11: Pops up the Visual Basic Editor for editing the macros.

Hopefully these macros will help you save time and improve your productivity.

If you have any other shortcut which you find useful, do send me a note. I would love to hear from you. You can send it to vinai@excelchamp.net.

Cheers,
Vinai Prakash

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!


I teaches Excel, Advanced Excel techniques, and Dashboarding techniques in various countries. If you have a group of 10 or more participants,  I can come down to do a workshop for your group in your country – Vinai

Do You Use These Features of Microsoft Excel?

Most people hardly use the most useful features available in Microsoft Excel. Many are just using Excel as a calculator to do basic calculations like adding or subtracting numbers. This is a gross under use of Excel’s vast potential and feature rich functionality.

Do a quick check, and see if you use these advanced features of Microsoft Excel in your day to day work to improve your productivity and efficiency.

  1. Finding the Top 10 Customers or Finding the Bottom 5 Performers in the organization
  2. Give Names to Range of Cells, and then use them in formulas for easy referencing and decoding – like =Salary – CPF + Allowance
  3. Exploit Pivot Tables to Summarize the data and slice & dice it in any way – like finding sales by product groups, or calculating productivity by department, or calculating sales by department by product by area.
  4. Write Macros to automate routine things that save you a huge amount of time – example creating different pivots, charts, tables, and doing complex calculations, or compiling the cost benefit ration, cash flow statement automatically.
  5. Highlight values that are above or below a certain threshold – like all sales above $25,000 to be highlighted, or all products with a net profit margin of less than 5% be highlighted.
  6. Sort the values in Ascending, Descending or any Customized sorting order – like sorting in order of Manufacturing, Accounts, Sales departments.
  7. Use advanced filtering conditions, and be able to filter data using multiple different criteria – like salary > 50,000 and sales <100,000 or Zone in East, West.
  8. Create fantastic charts that portray the given business situation perfectly. There are over 50 different types of charts to choose from, and each has its edge, advantages and a reason. Do you know when to use which type of chart – like two axis charts, stacked column and line charts, bubble charts, pie, slice of a pie etc.
  9. Create management dashboard that are dynamic, and provide a complete snapshot of the key business KPIs in the company – change the chart values at the click of a checkbox or change in a dropdown value
  10. Use Excel’s advanced What-If analysis to do projections for future, forecasting, trend analysis etc. with ease
  11. Use Lookup tables to find any value or corresponding value from a table using advanced functions and formulas – find values that in the left of the looked up value
  12. Protect certain cells from data entry, and hide the formulas from other cells. Ensure that only certain values are keyed in the cells to avoid data discrepancies.

Want to Improve Your Excel Skills?

Learn the Key Features of Excel Quickly & Easily, by Joining the
Online Training on Basic / Intermediate Excel.

To Get Most out of Excel, Learn the  Pivot Table techniques in our
Pivot Table Masterclass Training
!


This is just the tip of the iceberg… These are common things that can be done easily with Excel’s in-built features.

So how many of these did you know? And how many would you like to learn more about? Even if you learn one new trick in Excel, it will save you immense time and improve your productivity. Investing in Microsoft Excel Training bears fruit in no time, and is a no brainer.

Microsoft Excel is really extremely powerful. Each version of Microsoft Excel – be it Excel 2007, or Excel 2010 or Excel 2013, Excel 2016 or Office 365 adds more and more features to the already powerful dynamite of a package.

At ExcelChamp, we teach people how to leverage the maximum power out of Microsoft Excel in short training courses.

So what are you waiting for? If you would like to learn any one or more of such useful features of Microsoft Excel, just let us know. We provide online training through videos, which will show you each click, step by step, so you can master the new techniques easily, with exercises, and practical examples.

Go ahead, equip your team with the right skills. Get everyone on board to learn the basic and advanced features of Microsoft Excel, and Be Awesome in Excel!

Email to us to know more about Online Excel Training at ExcelChamp.Net.

Cheers,
VInai Prakash, PMP, ITIL, GAP, Six Sigma, Excel Guru

Are you facing any problem in using Excel? Any Question?

You have come to the right place. Tell us your needs. We’ll be glad to help you!