No idea how to title...Sorting in Excel to include group header?

Related1

New Member
Joined
May 22, 2017
Messages
15
Hi! I'm not sure how to phrase my question which makes hard to search for an answer....Can I sort by a grouping under a heading?

I have a sheet that I want to filter (by person), but I want the subheadings (Project name) to be included with the filtering. I can only explain by pictures :rolleyes:

The original spreadsheet:



When I filter for Holly to see her tasks, I see this (it removes the grouping header):




I would like to see this so she knows which project the task belongs to.



My only thought would be to add a column with the list of the project name,and create a custom filter which would filter 1st by the person's name and then by the project name.. Oh, that might work. Nope. It put the project names in alphabetical order. I'd like to keep them in the order I have them in. I feel like there is a really simple solution I'm missing here.

Any other ideas?

THANK YOU!!
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

alansidman

Well-known Member
Joined
Feb 26, 2007
Messages
5,690
Office Version
2019
Platform
Windows
Can you post a sample file to a third party site so that it can be manipulated. ie. Box.net, Dropbox.com, etc. I believe that this can be easily accomplished using Power Query but personally, I don't like having to try and re-create an existing file and guess as to the structure.
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
5,831
something like this?

ProjectsStephenHollySullivanNamesHolly
Project 1
Task 1XXXProjectsTasksValue
Task 2XProject 1Task 1X
Task 3XTask 2X
Task 4XTask 3X
Task 5XTask 4X
Task 5X
Project 2Project 2Task 6X
Task 6XXTask 8X
Task 7XTask 9X
Task 8X
Task 9XXX
Task 10X

Power Query then Pivot Table from Query table.
You can set Pivot Table according to your needs of course :)

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    IF = Table.AddColumn(Source, "Custom", each if Text.Contains([Projects], "Project") then [Projects] else null),
    ErrorOut = Table.RemoveRowsWithErrors(IF, {"Custom"}),
    FillD = Table.FillDown(ErrorOut,{"Custom"}),
    UOC = Table.UnpivotOtherColumns(FillD, {"Projects", "Custom"}, "Attribute", "Value"),
    Rename = Table.RenameColumns(UOC,{{"Projects", "Tasks"}, {"Custom", "Projects"}, {"Attribute", "Names"}})
in
    Rename[/SIZE]
 
Last edited:

Related1

New Member
Joined
May 22, 2017
Messages
15
something like this?

[COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Projects[/COLOR][COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Stephen[/COLOR][COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Holly[/COLOR][COLOR=[URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=FFFFFF]#FFFFFF[/URL] ]Sullivan[/COLOR]NamesHolly
Project 1
Task 1XXXProjectsTasksValue
Task 2XProject 1Task 1X
Task 3XTask 2X
Task 4XTask 3X
Task 5XTask 4X
Task 5X
Project 2Project 2Task 6X
Task 6XXTask 8X
Task 7XTask 9X
Task 8X
Task 9XXX
Task 10X

<tbody>
</tbody>
YES! Thank you so much!!!!
 

Watch MrExcel Video

Forum statistics

Threads
1,102,630
Messages
5,488,000
Members
407,617
Latest member
Samanthad2007

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top