Solved

Excel Sort/Filter on a Large Sheet Giving Wonky Result

Posted on 2013-05-22
6
234 Views
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??
0
Comment
Question by:Michael_Hopcroft
  • 3
  • 2
6 Comments
 
LVL 1

Expert Comment

by:blongacre
Comment Utility
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.
0
 
LVL 92

Expert Comment

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

Author Comment

by:Michael_Hopcroft
Comment Utility
Matthew: The workbook contains confidential client information so I obviously won't be sending it out.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 92

Expert Comment

by:Patrick Matthews
Comment Utility
Then use fake or obfuscated data.
0
 

Accepted Solution

by:
Michael_Hopcroft earned 0 total points
Comment Utility
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....
0
 

Author Closing Comment

by:Michael_Hopcroft
Comment Utility
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.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now