Quantcast
Channel: Active questions tagged worksheet-function - Super User
Viewing all articles
Browse latest Browse all 999

Pull dynamic hierarchy from another sheet

$
0
0

I have an excel file with two sheets, from which I want to create a template.

In sheet 1 I want to be able to insert tasks and subtasks of a project. Each tasks can have a changing number of subtasks, depending on the project. Tasks and subtasks are defined via a dropdown menu - so far so easy.

Now I want to take this list and put it into my second sheet. Depending wether it is a task or a subtask, the subsequent cell in the row should include certain formulas.

Example:

hierarchydayscosts
task1=sum(C3:C4)
subtask1.13=B3*800
subtask1.21=B4*800
task2=sum(C6:C8)
subtask2.12=B6*800
subtask2.26=B7*800
subtask2.34=B8*800

The cells in column C should all be automatically added, so I only have to insert values in column B. As you can see, the formaluas in the tasks cells sometimes need to "know" how many subtasks there are. Next time, the sheet is used, there could be eg. 6 tasks with 5-10 subtasks.

Is there a way to achieve this using standard excel tools?If not: Is there a way to do this using vba?

(I don't know vba apart from being able to press Alt+F11 and copy-paste code)


Viewing all articles
Browse latest Browse all 999

Trending Articles