Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Excel Sort/Filter on a Large Sheet Giving Wonky Result

Posted on 2013-05-22
Medium Priority
Last Modified: 2013-05-28
I built an Excel 10 data sheet at work intended to harvest information about the location of our clients. I'm trying to use the sort and filter functions to display which zipcodes have the most customers, both in total and by our two  locations.

The problem is that when I sort my worksheet by number of clients I get wonky results. Specifically, the numbers for the two locations do not add up to the number of clients total for any given zip code.

The sheets are built so that everything refers directly to a core sheet with the data. Each cell is a COUNTIFS function based on zipcode, location of service, gender, service provider and various other pieces of information. The number of clients per zipcode is in the second column of the results sheets -- the first column is the zipcode, and data on the columns to the right is further refined queries.

The problem occurs when I try to sort the entire results sheet by most clients at a zip code. hen I do that the COUNTIFS forumlas tend to be different than what I would have expected it to see. Particularly they refer to the old row rather than the one the sorter moved the data to, even though only the column is absoluted. for example, when the cell is moved from C25 to C6 the reference should be to $A6, but instead it still points to $A25. the same construction works fine when I extracted the data in the first place.

How can I make the sort function do what it is meant to and maintain the integrity of the data rows in the extracted sheet I'm trying to sort??
Question by:Michael_Hopcroft
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 39189489
You could potentially build a group of fields where you can specify what you want to have counted, then use if statements (in hidden columns) to show a 1 or a 0 depending on if the criteria in your fields is met, and run a sum of those columns to show you your summary information.

It could be a little clunky to build, however, it would likely be one avenue to meet your objectives.

Another other option would be to use a Pivot Table to display the information that you want to display.
LVL 93

Expert Comment

by:Patrick Matthews
ID: 39190523
Without a sample file, it is going to be very difficult to answer this question.

Author Comment

ID: 39191620
Matthew: The workbook contains confidential client information so I obviously won't be sending it out.
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

LVL 93

Expert Comment

by:Patrick Matthews
ID: 39192324
Then use fake or obfuscated data.

Accepted Solution

Michael_Hopcroft earned 0 total points
ID: 39192843
I managed to work around the issue with forumla addresses. Since the original data was intact and had been left alone, I was able to copy the data to a new sheet as values only. This stripped out the location information and left me with the results only.

After that the sort and filter worked just the way I wanted it to on those sheets.

I'd still like to know why Excel did that so I don't repeat whatever error I made, but for now I don't feel too bad about it. At least now the results make some kind of sense....

Author Closing Comment

ID: 39200676
This was the way I actually resolved the issue on site. It's not the perfect solution, and I keep hoping for a better one, but for now the task is accomplished so I'm not going to mess around further right now.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question