Tree sumation in Excel (with or, if possible, without VBA)

sandros

New Member
Joined
Oct 15, 2017
Messages
9
Hello everybody,

I have to model branched water supply network showed in picture attached here
jJFhMx
https://goo.gl/jJFhMx.
Node numbers are written in brackets, while pipe numbers are written in red and rectangled. Water demand is defined in nodes and marked with an arrow.

So, input data are pipe number, upstream node number, downstream node number and demand in downstream node as in attached .xls file https://goo.gl/EqA6kz.

Is it possible to get flows in pipes by summation all demands in nodes "downstream" of the specific pipe?

I hope I was clear and thanks in advance!
Sandro
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Hi oldbrewer!

There aren't any. I mean the hydraulics is here irrelevant. If you look at sketch I attached you can interpret it as tree with parent-child relationship. I mean, I have only sum of demands, so the pipe No. 1 is "on the bottom of the tree" and it conveys all the dischage or flow, i. e. 80.
 
Upvote 0
Here's an analogue for electrical demand.

B​
C​
D​
E​
2​
Node
Parent Node
Direct Load
Total Load
3​
1​
14​
846​
4​
2​
1​
10​
87​
5​
3​
1​
15​
629​
6​
4​
3​
70​
448​
7​
5​
4​
83​
311​
8​
6​
1​
49​
49​
9​
7​
3​
50​
50​

Node 1 (a big power distribution unit) has a direct load of 14 amps, plus it feeds nodes 2 and 3. Column E calculates the total demand for each node. (The whole network is not shown in the example.)

Yours should work the same way, but I can't figure out the corresponding columns or why you have an extra one.
 
Last edited:
Upvote 0
Here's a complete example if you want to verify manually. The loads and connections are random, so they change each time the sheet calculates.

B​
C​
D​
E​
2​
Node
Parent Node
Direct Load
Total Load
3​
1​
14​
456​
4​
2​
1​
20​
442​
5​
3​
2​
44​
224​
6​
4​
2​
58​
198​
7​
5​
4​
30​
140​
8​
6​
3​
10​
107​
9​
7​
5​
84​
84​
10​
8​
5​
26​
26​
11​
9​
3​
73​
73​
12​
10​
6​
97​
97​

If you can arrange your pipe tree in that fashion, I'll show you the formula.
 
Last edited:
Upvote 0
Hi shg, thanks for your reply.

I could arrange my pipe tree:

NodeParent NodeDirect LoadTotal Load
1
2110
3220
43
52
6510
7620
865
9610
109
1195

<tbody>
</tbody>
 
Upvote 0
That's not arranged the same way -- it still has an extra column.

EDIT: In fact, it looks unchanged.
 
Last edited:
Upvote 0
B​
C​
D​
E​
F​
2​
Node
Parent Node
Direct Load
Total Load
3​
1​
80​
E3: =D3 + SUMIF($C$3:$C$13, $B$3:$B$13, $E$3:$E$13)
4​
2​
1​
10​
80​
5​
3​
2​
20​
20​
6​
4​
3​
-​
7​
5​
2​
50​
8​
6​
5​
10​
50​
9​
7​
6​
20​
20​
10​
8​
6​
5​
5​
11​
9​
6​
10​
15​
12​
10​
9​
-​
13​
11​
9​
5​
5​
 
Upvote 0

Forum statistics

Threads
1,215,747
Messages
6,126,652
Members
449,326
Latest member
asp123

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