Link to home
Start Free TrialLog in
Avatar of Michael_Hopcroft
Michael_HopcroftFlag for United States of America

asked on

Excel Sort/Filter on a Large Sheet Giving Wonky Result

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??
Avatar of blongacre
blongacre

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.
Avatar of Patrick Matthews
Without a sample file, it is going to be very difficult to answer this question.
Avatar of Michael_Hopcroft

ASKER

Matthew: The workbook contains confidential client information so I obviously won't be sending it out.
Then use fake or obfuscated data.
ASKER CERTIFIED SOLUTION
Avatar of Michael_Hopcroft
Michael_Hopcroft
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.