Excel Sort/Filter on a Large Sheet Giving Wonky Result

Posted on 2013-05-22
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
  • 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 92

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.
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

LVL 92

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

786 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