filtering task list with sub task that follow parent task

B-Man

Board Regular
Joined
Dec 29, 2012
Messages
183
Office Version
  1. 2019
Platform
  1. Windows
Im looking to do a job list in excel similar to the below and was hoping to be able to filter it by category and/or priority. but how do I get it to keep the sub tasks aligned with the task without duplicating the priority numbers and task for every subtask.
I feel like I could conditional format font to white if cell is = to the one above it (although would have have a trickier one for priority.) but then I would have to retype it for everything. is there some sort of easier solution?


CategoryPriorityTaskSub Task
House1CleanSweep Floors
Wash Dishes
House2Install benchassemble items
screw bench top on
seal benchtop to wall
Garden1Plant TreesPlant natives
plant fruit trees
fertilise
water
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi B-Man
I have a question first. How is the raw data looking? Or is what you've posted how the data presents itself?

EDIT: a pivot shows data like so per default (tabular view, without subtotals).
Book1
ABCDEFGHIJK
1CategoryPriorityTaskSub TaskCategoryPriorityTaskSub Task
2House1CleanSweep FloorsGarden1Plant Treesfertilise
3House1CleanWash Dishesplant fruit trees
4House2Install benchassemble itemsPlant natives
5House2Install benchscrew bench top onwater
6House2Install benchseal benchtop to wallHouse1CleanSweep Floors
7Garden1Plant TreesPlant nativesWash Dishes
8Garden1Plant Treesplant fruit trees2Install benchassemble items
9Garden1Plant Treesfertilisescrew bench top on
10Garden1Plant Treeswaterseal benchtop to wall
11
Sheet1
Cell Formulas
RangeFormula
B3:D3,B8:D10,B5:D6B3=B2

EDIT 2: The "first field" in the "rows" section of the picot, determines which labels are repeated.
Book1
GHIJ
1TaskCategoryPrioritySub Task
2CleanHouse1Sweep Floors
3Wash Dishes
4Install benchHouse2assemble items
5screw bench top on
6seal benchtop to wall
7Plant TreesGarden1fertilise
8plant fruit trees
9Plant natives
10water
Sheet1
 
Last edited:
Upvote 0
Raw Data is as it appears. although the sub task isn't on the same row as the task it starts a row below (oversight in typing it on the forum) I'm just starting so it can look like anything. ideally the less work involved in typing it up the better.
I guess it would look good to view like freshly edited below

I have been trying to play with groups which would work ok. If I filter it by category it seems to work but if I filter by priority the Header moves but the group seems to stay in the same place (same rows). so it appears by filtering rows out and hiding them it works but by rearranging them it breaks it. I like how it can hide the sub task and easy to expand it when wanting to view.

I'll have a look at pivot table. ideally I didn't want to have to retype all the data for each row but if it works its better than where im at the moment.

CategoryPriorityTask/Subtask
House1Clean
- Sweep Floors
- Wash Dishes
House2Install bench
- assemble items
- screw bench top on
- seal benchtop to wall
Garden1Plant Trees
- Plant natives
- plant fruit trees
- fertilise
- water
 
Last edited:
Upvote 0
As a general tip, it is very helpful if your account details tell us a bit more on the version you use and your operating system. Also sharing data with XL2BB add-on is better then plane pasted data.

Maybe Power Query can offer you a solution, avoiding to type in data manually, as it has a feature called "Fill Down".
Power Query:
let
    Source = Excel.Workbook(File.Contents("G:\Uploads\TaskSubTaskFilter.xlsx"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Category", type text}, {"Priority", Int64.Type}, {"Task/Subtask", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "SubTask", each if [Category] = null then [#"Task/Subtask"] else null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Task", each if [SubTask] = null then [#"Task/Subtask"] else null),
    #"Filled Down" = Table.FillDown(#"Added Custom1",{"Category", "Priority", "Task"}),
    #"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([SubTask] <> null)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Task/Subtask"})
in
    #"Removed Columns"

I made a quick tutorial, but the animated JPEG is too big to share. Maybe I'll share it later if I can edit it.
 
Upvote 0
Hi B-Man
I have a question first. How is the raw data looking? Or is what you've posted how the data presents itself?

EDIT: a pivot shows data like so per default (tabular view, without subtotals).
Book1
ABCDEFGHIJK
1CategoryPriorityTaskSub TaskCategoryPriorityTaskSub Task
2House1CleanSweep FloorsGarden1Plant Treesfertilise
3House1CleanWash Dishesplant fruit trees
4House2Install benchassemble itemsPlant natives
5House2Install benchscrew bench top onwater
6House2Install benchseal benchtop to wallHouse1CleanSweep Floors
7Garden1Plant TreesPlant nativesWash Dishes
8Garden1Plant Treesplant fruit trees2Install benchassemble items
9Garden1Plant Treesfertilisescrew bench top on
10Garden1Plant Treeswaterseal benchtop to wall
11
Sheet1
Cell Formulas
RangeFormula
B3:D3,B8:D10,B5:D6B3=B2

EDIT 2: The "first field" in the "rows" section of the picot, determines which labels are repeated.
Book1
GHIJ
1TaskCategoryPrioritySub Task
2CleanHouse1Sweep Floors
3Wash Dishes
4Install benchHouse2assemble items
5screw bench top on
6seal benchtop to wall
7Plant TreesGarden1fertilise
8plant fruit trees
9Plant natives
10water
Sheet1
I had a Play with Pivot Tables but cant get it to display how I wanted.
Ideally id like to be able to just delete the data when the task is done but with a pivot table I would have to open the data sheet and delete the item then refresh the pivot table correct?
 
Upvote 0
As a general tip, it is very helpful if your account details tell us a bit more on the version you use and your operating system. Also sharing data with XL2BB add-on is better then plane pasted data.

Maybe Power Query can offer you a solution, avoiding to type in data manually, as it has a feature called "Fill Down".
Power Query:
let
    Source = Excel.Workbook(File.Contents("G:\Uploads\TaskSubTaskFilter.xlsx"), null, true),
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Category", type text}, {"Priority", Int64.Type}, {"Task/Subtask", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "SubTask", each if [Category] = null then [#"Task/Subtask"] else null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Task", each if [SubTask] = null then [#"Task/Subtask"] else null),
    #"Filled Down" = Table.FillDown(#"Added Custom1",{"Category", "Priority", "Task"}),
    #"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([SubTask] <> null)),
    #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Task/Subtask"})
in
    #"Removed Columns"

I made a quick tutorial, but the animated JPEG is too big to share. Maybe I'll share it later if I can edit it.
I did notice the XL2BB thing but not sure how to use it.
I'm using windows 10, Excel 2013

A quick tutorial would be great. while I dabble in excel there's a lot of stuff I haven't touched.

is this a macro to prefill the data after i have typed or during my typing?
is there a way to not display the duplicate info?
 
Upvote 0
I did notice the XL2BB thing but not sure how to use it.
I'm using windows 10, Excel 2013
Have a read on XL2BB
Thanks for letting us know. Please do put this info on your account details. It will be useful for your later posts.
A quick tutorial would be great. while I dabble in excel there's a lot of stuff I haven't touched.
Seems I can't shrink the size of the animated gif I made :( As I'm back to work after some holidays, I won't have time to make a written version of it.
is this a macro to prefill the data after i have typed or during my typing?
No, Power Query needs to be "refreshed", but if you have it loaded as a pivot, a single refresh is enough (the Pivot will refresh the query).
is there a way to not display the duplicate info?
The duplicated information depends on how you use the fields inside the pivot, as shown in #2.
Ideally id like to be able to just delete the data when the task is done but with a pivot table I would have to open the data sheet and delete the item then refresh the pivot table correct?
My suggestion would be to use a status field then use this field in a filter of the pivot. But, yes, updates are done inside the raw data.
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,198
Members
449,072
Latest member
DW Draft

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top