formula to generate multilevel list numbering

coffeenazi

New Member
Joined
Aug 17, 2010
Messages
17
Office Version
  1. 365
Platform
  1. Windows
Hi all, I have a dataset that consists of multiple unique "Activities", that are grouped within a multilevel list like this:


Focus area (Column A)Action (Column B)Deliverable (Column C)Activity (Column D)
1​
1.1​
1.1.11.1.1.1
1​
1.2​
1.2.11.2.1.1
1​
1.2​
1.2.11.2.1.2
2​
2.1​
2.1.12.1.1.1
2​
2.1​
2.1.12.1.1.2
2​
2.1​
2.1.12.1.1.3

The values under each of these heading are very detailed text strings. for example, some of the Actions have over 380 characters in the text string.

I am trying to write a formula that will create a dynamic multilevel list number in Column D, unique for each Activity but nested under that Activity's Deliverable, Action, and Focus area.

All help would be greatly appreciated, and thank you in advance!
 
ok, I'm trying that new concat formula but I'm getting the below error message. Is there an add-in that is needed for this formula?

View attachment 110171
sorry, that is for five levels. try this one.

=CONCAT(ROWS(UNIQUE(A$2:A2)),"."&MAP(B2:D2,B$2:D$2,A2:C2,LAMBDA(x,y,z,ROWS(UNIQUE(FILTER(y:x,BYROW(A$2:z,lambda(m,CONCAT(m)))=CONCAT(A2:z)))))))
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
1713478131795.png

getting closer, now the result from that formula is TRUE :)
 
Upvote 0
View attachment 110176
getting closer, now the result from that formula is TRUE :)
copy below formula and paste in E2, don't just update part of exsiting formula.

=CONCAT(ROWS(UNIQUE(A$2:A2)),"."&MAP(B2:D2,B$2:D$2,A2:C2,LAMBDA(x,y,z,ROWS(UNIQUE(FILTER(y:x,BYROW(A$2:z,lambda(m,CONCAT(m)))=CONCAT(A2:z)))))))
 
Last edited:
Upvote 0
I incorporated the starting row value in the formula. You can put this formula in E2 and drag down. Just make sure that you don't have a period in the E1 heading.

Book1
ABCDE
1Focus area (Column A)Action (Column B)Deliverable (Column C)Activity (Column D)Unique Activity ID (Column E)
21. The quick brown fox jumps over the lazy dog.Tomorrow is a brand new day, full of possibilities.With great power comes great responsibility.Let's meet at the café down the street for coffee.1.1.1.1
31. The quick brown fox jumps over the lazy dog.Tomorrow is a brand new day, full of possibilities.With great power comes great responsibility.The majestic mountains stood tall against the clear blue sky.1.1.1.2
41. The quick brown fox jumps over the lazy dog.Tomorrow is a brand new day, full of possibilities.With great power comes great responsibility.Happiness can be found even in the darkest of times.1.1.1.3
51. The quick brown fox jumps over the lazy dog.Life is like a camera. Focus on what's important and capture the good times.In every walk with nature, one receives far more than he seeks.Dreams don't work unless you do.1.2.1.1
61. The quick brown fox jumps over the lazy dog.Life is like a camera. Focus on what's important and capture the good times.In every walk with nature, one receives far more than he seeks.Keep calm and carry on.1.2.1.2
Sheet1
Cell Formulas
RangeFormula
E2:E6E2=IF(COUNTIF(E1,"*.*")=0,"1.1.1.1",LET(a,TEXTSPLIT(E1,"."),b,MATCH(TRUE,A1:D1<>A2:D2,0),s,{1,2,3,4},TEXTJOIN(".",1,IFS(s<b,INDEX(a,s),s=b,INDEX(a,s)+1,1,1))))
 
Upvote 0
Solution
T
I incorporated the starting row value in the formula. You can put this formula in E2 and drag down. Just make sure that you don't have a period in the E1 heading.

Book1
ABCDE
1Focus area (Column A)Action (Column B)Deliverable (Column C)Activity (Column D)Unique Activity ID (Column E)
21. The quick brown fox jumps over the lazy dog.Tomorrow is a brand new day, full of possibilities.With great power comes great responsibility.Let's meet at the café down the street for coffee.1.1.1.1
31. The quick brown fox jumps over the lazy dog.Tomorrow is a brand new day, full of possibilities.With great power comes great responsibility.The majestic mountains stood tall against the clear blue sky.1.1.1.2
41. The quick brown fox jumps over the lazy dog.Tomorrow is a brand new day, full of possibilities.With great power comes great responsibility.Happiness can be found even in the darkest of times.1.1.1.3
51. The quick brown fox jumps over the lazy dog.Life is like a camera. Focus on what's important and capture the good times.In every walk with nature, one receives far more than he seeks.Dreams don't work unless you do.1.2.1.1
61. The quick brown fox jumps over the lazy dog.Life is like a camera. Focus on what's important and capture the good times.In every walk with nature, one receives far more than he seeks.Keep calm and carry on.1.2.1.2
Sheet1
Cell Formulas
RangeFormula
E2:E6E2=IF(COUNTIF(E1,"*.*")=0,"1.1.1.1",LET(a,TEXTSPLIT(E1,"."),b,MATCH(TRUE,A1:D1<>A2:D2,0),s,{1,2,3,4},TEXTJOIN(".",1,IFS(s<b,INDEX(a,s),s=b,INDEX(a,s)+1,1,1))))
That's got it! Thank you!
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

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