I need the formula for WBS No. of my tasks

suri7891

New Member
Joined
Dec 24, 2020
Messages
24
Office Version
  1. 2016
Hi there,

I have all my main task and subtasks in the same row. I need the formula to generate the WBS No. of each task according to the main task, sub task and also the sub task's of sub task.

Please find the sample below. All main task, sub tasks and sub task's of sub tasks are separated by "|" symbol. Please help with the formula to generated the Task Outline number.

Task NameTaskOutlineNumber
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)0
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services1
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Client Training1.1
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Dev Ops1.2
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Environment Management1.3
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Non-Chargeable Activities1.4
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Non-Chargeable Activities|Core Bug Fixing1.4.1
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Non-Chargeable Activities|Environment Management (non-chargeable)1.4.2
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Non-Chargeable Activities|Internal Training1.4.3
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Non-Chargeable Activities|System Testing1.4.4
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Implementation Services|Non-Chargeable Activities|Travel1.4.5
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Project Services2
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Project Services|Conversion Delivery Management2.1
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Project Services|PMO2.2
8124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)|Project Services|Project Management2.3
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I haven't got the slightest idea about what a WBS number is??
 
Upvote 0
Arthur, its a Work Breakdown Structure number.

The OP has presented what on the face of it is pretty straightforward, but is (I think) quite challenging. I'm currently thinking the easiest solution will be a recursive function or PowerQuery. It'll give me something to consider.
 
Upvote 0
Arthur, its a Work Breakdown Structure number.

The OP has presented what on the face of it is pretty straightforward, but is (I think) quite challenging. I'm currently thinking the easiest solution will be a recursive function or PowerQuery. It'll give me something to consider.
Thanks Arthur. Yes, it is WBS no. I am waiting for the formula to apply on my tasks in excel.
 
Upvote 0
There was a solution on www about 10 years ago.
The WBS with VBA flowed I think from Excel's indent.
You could check that article (post) and the comments; the approach or ideas may be useful.

search for
Project-Style (WBS) Numbering
 
Upvote 0
Well, the need to refer to the rows above made the recursive solution impossible. I've settled on a two stage approach:

1. Click in your source column, then chose 'From Table' in the 'Get & Transform' tab of the Data ribbon. In the query editor that then appears split the column containing your tasks/subtasks using '|' as the delimiter. Click 'Close & Load' on the Home ribbon. The revised data will be loaded to a new table. You could split the column using excel, but the advantage of this is it can be automated and indeed can be modified to accept data from a file rather than needing to be embedded in your workbook. (With more effort I might be able to do the whole solution in PowerQuery, but I don't think it would be straightforward.)
2. Apply the formula's as shown below.

Note, I think that, formally, your WBS examples are not rigorous: you change the top level numbering from 0 to 1, when you start to decompose the task.

HTH

Book2.xlsx
ABCDEFGHI
1Task Name.1Task Name.2Task Name.3Task Name.4Level 1Level 2Level 3Level 4WBS Number
28124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)1   1
38124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation Services11  1.1
48124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesClient Training111 1.1.1
58124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesDev Ops112 1.1.2
68124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesEnvironment Management113 1.1.3
78124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable Activities114 1.1.4
88124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesCore Bug Fixing11411.1.4.1
98124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesEnvironment Management (non-chargeable)11421.1.4.2
108124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesInternal Training11431.1.4.3
118124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesSystem Testing11441.1.4.4
128124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesTravel11451.1.4.5
138124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Project Services12  1.2
148124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Project ServicesConversion Delivery Management121 1.2.1
158124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Project ServicesPMO122 1.2.2
168124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Project ServicesProject Management123 1.2.3
Sheet2
Cell Formulas
RangeFormula
E2:E16E2=IF([@[Task Name.1]]<>"",IF(A2<>A1,IFERROR(E1+1,1),E1),"")
F2:F16F2=IF([@[Task Name.2]]<>"",IF(B2<>B1,IFERROR(F1+1,1),F1),"")
G2:G16G2=IF([@[Task Name.3]]<>"",IF(C2<>C1,IFERROR(G1+1,1),G1),"")
H2:H16H2=IF([@[Task Name.4]]<>"",IF(D2<>D1,IFERROR(H1+1,1),H1),"")
I2:I16I2=[@[Level 1]] & IF([@[Level 2]]<>"","."&[@[Level 2]] & IF([@[Level 3]]<>"","."&[@[Level 3]] & IF([@[Level 4]]<>"","."&[@[Level 4]],""),""),"")
Named Ranges
NameRefers ToCells
ExternalData_1=Sheet2!$A$1:$D$16E2
 
Upvote 0
Well, the need to refer to the rows above made the recursive solution impossible. I've settled on a two stage approach:

1. Click in your source column, then chose 'From Table' in the 'Get & Transform' tab of the Data ribbon. In the query editor that then appears split the column containing your tasks/subtasks using '|' as the delimiter. Click 'Close & Load' on the Home ribbon. The revised data will be loaded to a new table. You could split the column using excel, but the advantage of this is it can be automated and indeed can be modified to accept data from a file rather than needing to be embedded in your workbook. (With more effort I might be able to do the whole solution in PowerQuery, but I don't think it would be straightforward.)
2. Apply the formula's as shown below.

Note, I think that, formally, your WBS examples are not rigorous: you change the top level numbering from 0 to 1, when you start to decompose the task.

HTH

Book2.xlsx
ABCDEFGHI
1Task Name.1Task Name.2Task Name.3Task Name.4Level 1Level 2Level 3Level 4WBS Number
28124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)1   1
38124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation Services11  1.1
48124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesClient Training111 1.1.1
58124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesDev Ops112 1.1.2
68124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesEnvironment Management113 1.1.3
78124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable Activities114 1.1.4
88124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesCore Bug Fixing11411.1.4.1
98124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesEnvironment Management (non-chargeable)11421.1.4.2
108124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesInternal Training11431.1.4.3
118124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesSystem Testing11441.1.4.4
128124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Implementation ServicesNon-Chargeable ActivitiesTravel11451.1.4.5
138124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Project Services12  1.2
148124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Project ServicesConversion Delivery Management121 1.2.1
158124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Project ServicesPMO122 1.2.2
168124 ING Matching SWIFT 2020 Upgrade (REC Upgrade Implementation)Project ServicesProject Management123 1.2.3
Sheet2
Cell Formulas
RangeFormula
E2:E16E2=IF([@[Task Name.1]]<>"",IF(A2<>A1,IFERROR(E1+1,1),E1),"")
F2:F16F2=IF([@[Task Name.2]]<>"",IF(B2<>B1,IFERROR(F1+1,1),F1),"")
G2:G16G2=IF([@[Task Name.3]]<>"",IF(C2<>C1,IFERROR(G1+1,1),G1),"")
H2:H16H2=IF([@[Task Name.4]]<>"",IF(D2<>D1,IFERROR(H1+1,1),H1),"")
I2:I16I2=[@[Level 1]] & IF([@[Level 2]]<>"","."&[@[Level 2]] & IF([@[Level 3]]<>"","."&[@[Level 3]] & IF([@[Level 4]]<>"","."&[@[Level 4]],""),""),"")
Named Ranges
NameRefers ToCells
ExternalData_1=Sheet2!$A$1:$D$16E2
Hi Peter,

Thanks for your effort. Your formulas and steps are helping me. But I have bunch of projects, tasks and sub tasks. So, it is taking a lot of time to apply for all the tasks in my bucket. Do you have any generalized formula to the cell? I mean - The formula should consider "|" as the subtasks and give us the outline numbers as 1.1.1, 1.1.2, 1.2.1, etc.
 
Upvote 0
Hi All,

I got some formula to populate the WBS no. but it is only taking till first "|" symbol as sub task.

Example : In Row no. 8. I have sub task of sub task (Core Bug Fixing). Therefore, the outline number should be 1.4.1. But I am not getting it. Can you one of you complete the below formula considering "|" as sub tasks.

=IF(B4="","",IF(OR(ROW()=2,B3=""),1+INT(MAX(A$1:A3)),A3+0.1))

1608813314168.png
 

Attachments

  • 1608813215591.png
    1608813215591.png
    56.4 KB · Views: 7
  • 1608813227870.png
    1608813227870.png
    52.9 KB · Views: 6
Upvote 0
T10_1701a.xlsm
AB
1Task
21ABC
31.1 Item 1
41.2 Item 2
51.2.1Item 2a
61.2.2Item 2b
71.2.2.1item 2b i
81.2.2.2item 2b ii
91.2.2.2.1item 2c ii a
102DDD
4c
 
Upvote 0
T10_1701a.xlsm
AB
1Task
21ABC
31.1 Item 1
41.2 Item 2
51.2.1Item 2a
61.2.2Item 2b
71.2.2.1item 2b i
81.2.2.2item 2b ii
91.2.2.2.1item 2c ii a
102DDD
4c
Hi Dave,

Thanks for your effort. I am unable to take the formula which is in the table. Please advise.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
Members
449,075
Latest member
staticfluids

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