Formula to pick up Dept and Sub Dept

Hazeyt

New Member
Joined
Jan 23, 2023
Messages
29
Office Version
  1. 365
Good afternoon. I am hoping someone can help with my question below thanks.

I have a dataset with Department and Sub Department headings that I layer on a monthly basis and these headings can change on a monthly basis along with new Sub Departments.

At present I use a pivot table and copy into a separate tab to capture them all.

Rather than doing a pivot table, I am looking for a formula to pick up the Department name first then list the Sub Departments which would include all old and new for each month from the dataset.

Thanks
Hazel
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
What do you mean by "layer"?
Can you post a small sample of your data and what your expected results would look like? Use the xl2bb link above or in the signature below.
 
Upvote 0
I have columns with Dept and Sub Depts headings and a column stating which month.

Every month I get a new list which I add to the bottom of my dataset (layer) and add the next month in the month column.

The list is for the financial year.

Hope this makes sense. Thanks
 
Upvote 0
If this isn't what you want, then you really need to provide some examples.
But, try this:
Book1
ABCDEFG
1DeptSubDeptMonthDeptSubDeptMonth
2Dept1SubDpt2JanDept1SubDpt2Jan
3Dept2SubDpt1FebDept2SubDpt1Jan
4Dept3SubDpt2MarDept3SubDpt2Jan
5Dept4SubDpt1JanDept4SubDpt1Jan
6Dept1SubDpt2FebDept1SubDpt2Feb
7Dept2SubDpt1MarDept2SubDpt1Feb
8Dept3SubDpt2JanDept3SubDpt2Feb
9Dept4SubDpt1FebDept4SubDpt1Feb
10Dept1SubDpt2MarDept1SubDpt2Mar
11Dept2SubDpt1JanDept2SubDpt1Mar
12Dept3SubDpt2FebDept3SubDpt2Mar
13Dept4SubDpt1MarDept4SubDpt1Mar
14Dept1SubDpt2Jan
15Dept2SubDpt1Feb
16Dept3SubDpt2Mar
17Dept4SubDpt1Jan
18Dept1SubDpt2Feb
19Dept2SubDpt1Mar
20Dept3SubDpt2Jan
21Dept4SubDpt1Feb
22Dept1SubDpt2Mar
23Dept2SubDpt1Jan
24Dept3SubDpt2Feb
25Dept4SubDpt1Mar
26Dept1SubDpt2Jan
27Dept2SubDpt1Feb
Sheet1
Cell Formulas
RangeFormula
E2:G13E2=SORT(SORT(SORT(UNIQUE(A2:C26,FALSE,FALSE),2,1,FALSE),1,1,FALSE),3,1,FALSE)
Dynamic array formulas.
 
Upvote 0
Solution
If this isn't what you want, then you really need to provide some examples.
But, try this:
Book1
ABCDEFG
1DeptSubDeptMonthDeptSubDeptMonth
2Dept1SubDpt2JanDept1SubDpt2Jan
3Dept2SubDpt1FebDept2SubDpt1Jan
4Dept3SubDpt2MarDept3SubDpt2Jan
5Dept4SubDpt1JanDept4SubDpt1Jan
6Dept1SubDpt2FebDept1SubDpt2Feb
7Dept2SubDpt1MarDept2SubDpt1Feb
8Dept3SubDpt2JanDept3SubDpt2Feb
9Dept4SubDpt1FebDept4SubDpt1Feb
10Dept1SubDpt2MarDept1SubDpt2Mar
11Dept2SubDpt1JanDept2SubDpt1Mar
12Dept3SubDpt2FebDept3SubDpt2Mar
13Dept4SubDpt1MarDept4SubDpt1Mar
14Dept1SubDpt2Jan
15Dept2SubDpt1Feb
16Dept3SubDpt2Mar
17Dept4SubDpt1Jan
18Dept1SubDpt2Feb
19Dept2SubDpt1Mar
20Dept3SubDpt2Jan
21Dept4SubDpt1Feb
22Dept1SubDpt2Mar
23Dept2SubDpt1Jan
24Dept3SubDpt2Feb
25Dept4SubDpt1Mar
26Dept1SubDpt2Jan
27Dept2SubDpt1Feb
Sheet1
Cell Formulas
RangeFormula
E2:G13E2=SORT(SORT(SORT(UNIQUE(A2:C26,FALSE,FALSE),2,1,FALSE),1,1,FALSE),3,1,FALSE)
Dynamic array formulas.
Thank you for your help.
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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