Logic Formulas for Dependency Tables

Alhelor

New Member
Joined
Jun 15, 2017
Messages
29
Hey folks,

Take a look at these three dependency tables:

5SgH16D.png


Let's take Dog as an example. In order to produce a Dog, you need to consume a Car and a House (1st degree dependency, first table). However, in order to produce a Car, you need to consume a Computer, and in order to produce a House, you need to consume a Cake. You can see it in the first table. However, it makes the Dog also dependent on a Computer and a Cake in 2nd degree (2nd table) because without those there's no Car and no House.

Now, Cake has no dependencies in the first table, so it can be assumed given. However, producing a Computer requires Your Mom. Thus, the Dog is dependent on Your Mom in 3rd degree (3rd table).

My question: What would the formulas in table 2 and 3 look like? Which functions to use?

If something is dependent on itself, return "".

Thank you!
 

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.
It's essentially the same formula for both tables:

ABCDEFGH
1
21st degree dependencies
3
4Green consumes RedCarDogHouseComputerYour MomWizardCake
5Carx
6Dogxx
7Housex
8Computerx
9Your Mom
10Wizardx
11Cake
12
13
142nd degree dependencies
15
16Green consumes RedCarDogHouseComputerYour MomWizardCake
17Carx
18Dogxx
19House
20Computer
21Your Mom
22Wizard
23Cake
24
25
263rd degree dependencies
27
28Green consumes RedCarDogHouseComputerYour MomWizardCake
29Car
30Dogx
31House
32Computer
33Your Mom
34Wizard
35Cake

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
B17{=IF(INDEX(MMULT(($B5:$H5="x")+0,($B$5:$H$11="x")+0),COLUMNS($B17:B17)),"x","")}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



Put the formula in B17, confirm with Control+Shift+Enter. Then copy to B17:H23 and B29:H35.

It does rely on the gap between tables being the same. If you change the ranges, you may need to adjust the formula within each table to match the proper ranges.

Hope this helps!
 
Upvote 0
Glad I could help!

Marcelo, Rada1, and Alhelor, thanks for the likes! I have to admit, I'm pretty happy with how that turned out. After I got it working, it simplified really nice.
 
Upvote 0
Glad I could help!

Marcelo, Rada1, and Alhelor, thanks for the likes! I have to admit, I'm pretty happy with how that turned out. After I got it working, it simplified really nice.

I slightly adjusted your formula to 1. avoid dependencies on oneself and 2. avoid multiple degree dependencies at once. It now looks like this:

CellFormula
B17{=IF($A17=B$16,"",(IF(B5="x","",IF(INDEX(MMULT(($B5:$H5="x")+0,($B$5:$H$11="x")+0),COLUMNS($B17:B17)),"x","")))}

<tbody>
</tbody>

<tbody>
</tbody>

I posted another thread for a (much more complex) continuation https://www.mrexcel.com/forum/excel...ons-dynamic-dependency-table.html#post4848271. Feel free to check it out! :p
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,907
Messages
6,122,183
Members
449,071
Latest member
cdnMech

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