Project task WBS selector and cost computing

Virgule

New Member
Joined
Sep 2, 2011
Messages
26
Hello friends,

I'm trying to create a sheet used for project estimation and i want it to be simple to use.

I want to be able to use buttons to create/delete tasks (cost item) as well as buttons to indent/outdent a task. The later should function like MSProject works. An indented task is now part of its parent category and the cost calculation is impacted as the parent task now sums all its children tasks and the total takes into account sub-totals not to sum same cost items twice. I would also like to have a WBS code that visually expresses that parent/child link.

Here is an example of a simple project estimation :

WBS CODEDESCRIPTIONCOST (K$)
1.0CONSTRUCTION PROJECT1 120
1.1
BUILDING
840
1.1.1
EXCAVATION​
90
1.1.2
CONCRETE​
750
1.2
PROCESS
210
1.2.1
PIPING​
80
1.2.2
EQUIPMENT​
130
1.3
ENGINEERING
70
1.3.1
PRELIMINARY​
40
1.3.2
DETAILED​
30

<tbody>
</tbody>


So let's go step by step.

1- How can I add buttons to indent and outdent a task ? This would add/delete a visual text indent, would have impact on the WBS code

2- How can I program parent tasks lines to bold when they are detected as containing child tasks as well as cost calculation being a summation of the contained tasks ?

3- How can I add buttons to create and delete tasks. Creating a task would for example insert a line under the cell selected with a sample task name ("TASK NAME") and current indentation of the above line. Deleting a task would delete the line of the cell selected and adjust the cost calculation and WBS codes of what's following. (ex : deleting task 1.3.4 would rename 1.3.5, 1.3.6, ... accordingly).

Any help is appreciated.

Regards,
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Ok so I started with create a task button. Here is the macro I have so far.


Sub Ajouter_tache()
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Cells(ActiveCell.Row, 2) = "DESCRIPTION"
End Sub


Problems so far :
- Doesn't add a line but, only a cell;
- Add cell at the current selection shifting selected cell down, rather than a line under selected cell;
- Changes the content of column 2 only when selected cell is at column 2+, doesn't when selected cell is in column 1
 
Upvote 0
Fixed problems above

Sub Ajouter_tache()
ActiveCell.Offset(1).EntireRow.Insert
Cells(ActiveCell.Row + 1, 2) = "DESCRIPTION"
End Sub


Working on deleting next.
 
Last edited:
Upvote 0
Deleting rows is easy :

Sub Supprimer_tache()
Rows(ActiveCell.Row).Delete Shift:=xlShiftUp
End Sub
 
Upvote 0
Indent and Outdent done :

Sub Indent()
Cells(ActiveCell.Row, 3).IndentLevel = Cells(ActiveCell.Row, 3).IndentLevel + 1
End Sub


Sub Outdent()
Cells(ActiveCell.Row, 3).IndentLevel = Cells(ActiveCell.Row, 3).IndentLevel - 1
End Sub


Now I just need to figure out how to detect indent levels and format accordingly (putting the text in bold).

I'm a VBA beginner. Do I just write the code for the rest of the workbook in the same module as the macros outside of subs ?
 
Last edited:
Upvote 0
Cross posted https://www.excelforum.com/excel-pr...ect-task-wbs-selector-and-cost-computing.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Cross posted https://www.excelforum.com/excel-pr...ect-task-wbs-selector-and-cost-computing.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.

I thought I only needed to post at one place, and so I did yesterday. Seeing that the thread is currently attracting eyes but no contribution yet, I did cross post right now. I'm currently actively working on this and was intending on updating both threads with my progress and solutions suggested. If both thread were to get suggestions I was to provide links to both. Sorry about not providing the thread link right away and thanks for notifying me of this rule.
 
Upvote 0
Ok, so let's be a bit more specific to focus potential contributors in a direction.

I'm thinking of having a set number of items (or lines) defined by a border formatting (bold border). I could therefore find the number of tasks/items by locating the border that possess that property :

Code:
Selection.Borders(xlEdgeBottom).Weight = xlMedium

Using the AddTask macro would then add 1 to that variable and the DeleteTask macro would substract 1. Am I onto something here ?
 
Upvote 0

Forum statistics

Threads
1,215,375
Messages
6,124,592
Members
449,174
Latest member
chandan4057

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