Excel subtotal command ignores filters

%3CLINGO-SUB%20id%3D%22lingo-sub-1377038%22%20slang%3D%22en-US%22%3EExcel%20subtotal%20command%20ignores%20filters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1377038%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20simple%20range%20of%20rows%20and%20columns.%20The%20first%20column%20is%20department%20and%20another%20column%20is%20location.%20The%20rows%20consist%20of%20descriptions%20of%20projects%20taking%20place%20within%20a%20department%20at%20different%20locations.%20I%20have%20used%20the%20subtotal%20command%20which%20enables%20the%20expansion%20of%20each%20department%20listing%20their%20projects.%20The%20subtotal%20rows%20count%20the%20number%20of%20projects%20and%20various%20other%20metrics%20in%20other%20columns.%20Then%2C%20of%20course%2C%20there%20is%20a%20grand%20total%20row%20at%20the%20bottom.%20So%20far%2C%20so%20good%2C%20the%20perfect%20solution%20I%20was%20looking%20for.%20However%2C%20now%20I%20simply%20want%20to%20filter%20the%20location%20column%20so%20I%20just%20show%20projects%20at%20a%20single%20location.%20This%20works%20fine%20when%20the%20table%20is%20fully%20expanded.%20However%2C%20when%20I%20compress%20the%20range%20to%20just%20the%20subtotal%20rows%20and%20then%20expand%20a%20particular%20department%20or%20the%20whole%20table%2C%20it%20ignores%20the%20filtering%20and%20shows%20all%20the%20locations%20again%2C%20even%20though%20that%20column%20is%20filtered.%20Is%20this%20a%20bug%3F%20I've%20search%20for%20hours%20on%20the%20web%20to%20see%20if%20anyone%20has%20had%20a%20similar%20problem%20but%20have%20not%20found%20a%20mention.%20I%20don't%20see%20another%20simple%20solution%20to%20this.%20Pivot%20tables%20won't%20work%20because%20I%20don't%20want%20to%20summarize%20all%20the%20data%2C%20I%20want%20to%20show%20the%20rows%20and%20subtotals%20for%20those%20rows%20filtered%20one%20way%20or%20the%20other.%20Seems%20like%20this%20should%20be%20easy.%20The%20only%20other%20solution%20I%20can%20envision%20is%20to%20create%20my%20own%20table%20and%20use%20macros%20to%20do%20the%20same%20thing%20the%20subtotal%20command%20does%2C%20but%20have%20it%20work%20properly%20which%20would%20be%20a%20lot%20of%20work.%20Or%20create%20a%20separate%20tables%20for%20each%20location.%20Any%20thoughts%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1377038%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1377056%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20subtotal%20command%20ignores%20filters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1377056%22%20slang%3D%22en-US%22%3E%3CP%3Ethe%20best%20way%20is%20to%20convert%20your%20range%20into%20table%20then%20go%20to%20the%20table%20option%20and%20select%20total%20row%2C%20it%20will%20not%20effect%20the%20filter%20as%20well%2C%20try%20it%20and%20tell%20me%20what%20happen%20%3F%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F662061%22%20target%3D%22_blank%22%3E%40tmoerke%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1377079%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20subtotal%20command%20ignores%20filters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1377079%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F662061%22%20target%3D%22_blank%22%3E%40tmoerke%3C%2FA%3E%26nbsp%3BHi.%20I%20am%20loading%20this%20word%20document%20explaining%20step%20for%20step%20how%20I%20think%20you%20are%20trying%20to%20acheive%20your%20objective.%20It's%20totally%20different%20data%2C%20but%20it%20shows%20you%20how%20to%20get%20what%20I%20think%20is%20the%20result%20you%20are%20trying%20to%20acheive.%20Have%20a%20read%20and%20hope%20it%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2424755%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20subtotal%20command%20ignores%20filters%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2424755%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F662071%22%20target%3D%22_blank%22%3E%40Les_Worrall%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20think%20you%20are%20missing%20our%20problem.%26nbsp%3B%20When%20filtering%2C%20the%20subtotal%2C%209%20does%20not%20change%20the%20sum%20to%20reflect%20what%20is%20being%20filtered%20(as%20would%20be%20expected).%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I have a simple range of rows and columns. The first column is department and another column is location. The rows consist of descriptions of projects taking place within a department at different locations. I have used the subtotal command which enables the expansion of each department listing their projects. The subtotal rows count the number of projects and various other metrics in other columns. Then, of course, there is a grand total row at the bottom. So far, so good, the perfect solution I was looking for. However, now I simply want to filter the location column so I just show projects at a single location. This works fine when the table is fully expanded. However, when I compress the range to just the subtotal rows and then expand a particular department or the whole table, it ignores the filtering and shows all the locations again, even though that column is filtered. Is this a bug? I've search for hours on the web to see if anyone has had a similar problem but have not found a mention. I don't see another simple solution to this. Pivot tables won't work because I don't want to summarize all the data, I want to show the rows and subtotals for those rows filtered one way or the other. Seems like this should be easy. The only other solution I can envision is to create my own table and use macros to do the same thing the subtotal command does, but have it work properly which would be a lot of work. Or create a separate tables for each location. Any thoughts? 

3 Replies

the best way is to convert your range into table then go to the table option and select total row, it will not effect the filter as well, try it and tell me what happen ?@tmoerke 

@tmoerke Hi. I am loading this word document explaining step for step how I think you are trying to acheive your objective. It's totally different data, but it shows you how to get what I think is the result you are trying to acheive. Have a read and hope it helps.

@Les_Worrall 

I think you are missing our problem.  When filtering, the subtotal, 9 does not change the sum to reflect what is being filtered (as would be expected).