Pinterest Pixel

Errors when grouping by dates

Bryan
With Pivot Tables, we usually group dates to aggregate our sales numbers.
And sometimes we get these dreaded errors when grouping by dates :

Errors when grouping by dates

The most common reason for facing this problem is that some of the cells contain invalid data. The date column might contain blank cells, text values, or an error.

Unfortunately, this message does not help you with the reason behind the error. So, you need to find ways to spot those errors and fix them one by one!

Let us quickly get to the bottom of those errors when grouping by dates.

 

Exercise Workbook:

Download excel workbookErrors-when-grouping-by-dates.xlsx


This is our current Pivot Table setup:

Errors when grouping by dates

 

Method 1: Use Go To Special

STEP 1: Right-click on any date in the Pivot Table and select Group

Errors when grouping by dates

We get the “Cannot group that selection” error message. There is something wrong with our dates in the data.

Errors when grouping by dates

STEP 2: Let us look for errors! Select the ORDER DATE column and press CTRL + G then click Special

Errors when grouping by dates

STEP 3: Select Constants, Text, and Errors.

This will get the dates that have errors. Click OK.

Errors when grouping by dates

STEP 4: The errors are now selected although we cannot see them. Click highlight and select any color.

Errors when grouping by dates

STEP 5: Click on the arrow beside the column and select Filter by Color

Errors when grouping by dates

You will now see the dates with errors. Let’s make a quick fix with these 4 dates.

Errors when grouping by dates

Now the dates are fixed.

Errors when grouping by dates

STEP 6: Right-click anywhere on your Pivot Table and select Refresh

Errors when grouping by dates

STEP 7: Right-click on any date in the Pivot Table and select Group

Errors when grouping by dates

It is working now!

Errors when grouping by dates

 

Method 2: Use Filters

A quick and easy way to find invalid data in the date column is to use the filter buttons. The filter dropdown will group all valid date values and all the dates containing errors will be left at the bottom of the list (ungrouped).

This is because Excel will not recognize those error values as dates and will store them as text.

In the example below, let us use the filters to find out the cells containing invalid data!

STEP 1: Click anywhere on the table.

Errors when grouping by dates

STEP 2: Go to Data > Filter.

Errors when grouping by dates

STEP 3: Click the filter button for the ORDER DATE column.

Errors when grouping by dates

As you can see all the correct dates have been grouped and the incorrect ones have been listed below.

Errors when grouping by dates

STEP 4: Uncheck the date groups and click OK.

Errors when grouping by dates

Now the column will display only the incorrect dates.

Errors when grouping by dates

Let us quickly fix them and see how the grouping feature starts working again in no time!

Errors when grouping by dates

 

Conclusion

In this article, you have learned how to fix errors when grouping by dates in Excel Pivot Table. Did you know there are many creative ways of doing grouping in Excel Pivot Tables? Learn all about it here!

 

Make sure to download our FREE PDF on the 333 Excel keyboard Shortcuts here:

If you like this Excel tip, please share it



Errors when grouping by dates | MyExcelOnline


Bryan

Bryan Hong is an IT Software Developer for more than 10 years and has the following certifications: Microsoft Certified Professional Developer (MCPD): Web Developer, Microsoft Certified Technology Specialist (MCTS): Windows Applications, Microsoft Certified Systems Engineer (MCSE) and Microsoft Certified Systems Administrator (MCSA).

He is also an Amazon #1 bestselling author of 4 Microsoft Excel books and a teacher of Microsoft Excel & Office at the MyExecelOnline Academy Online Course.

See also  Fix Column Width in a Pivot Table

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...