ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Custom sorting (https://www.excelbanter.com/excel-discussion-misc-queries/154128-custom-sorting.html)

Wanna Learn

Custom sorting
 
Hello - synopsis - worksheet with 5225 rows and 13 columns - contains dept
numbers and detailed monthly expenses for each dept. I only need info for 20
depts which equals about 500 rows. I've been sorting by Dept number then
deleting the depts I do not need ; then creating a pivot table .
Problem .
Since my dept nos are not in numberical order so I still have to go thru
the list to delete the ones I do use. Is there a way to extract the
department nos I do use instead or deleting the ones I do not use or another
faster way to do complete this task. Thanks

Dave Peterson

Custom sorting
 
I'd add another column to the raw data.

Put in a formula that evaluates to something nice:

=if(or(a2={"dept1","dept2","dept20"}),"keep it","hide it")

Then I could make this field a page field and show/hide what I wanted.

In fact, I'd put that list in another worksheet and use a formula like:
=if(isnumber(match(a2,sheet2!a:a,0)),"keep it", "hide it")

It might make adding/deleting the departments easier.

Wanna Learn wrote:

Hello - synopsis - worksheet with 5225 rows and 13 columns - contains dept
numbers and detailed monthly expenses for each dept. I only need info for 20
depts which equals about 500 rows. I've been sorting by Dept number then
deleting the depts I do not need ; then creating a pivot table .
Problem .
Since my dept nos are not in numberical order so I still have to go thru
the list to delete the ones I do use. Is there a way to extract the
department nos I do use instead or deleting the ones I do not use or another
faster way to do complete this task. Thanks


--

Dave Peterson


All times are GMT +1. The time now is 05:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com