join tables with many to many relationship using vba

paul100

New Member
Joined
Sep 18, 2012
Messages
41
Hi. This is my challenge. Join 3 tables (or more as defined in macro) each having 3 fields with a many to many relationship with the last column the product of the percentages in the row. Ie. In the first row of the result table the calc is 10%*100%*5%=0.005%. at the moment im using powerBi to build the table but would like a vba script.

Table 1

P000061, water, 10%

P000061, stormwater, 90%


Table 2

P000061, growth, 100%


Table 3

P000061, civil, 5%

P000061, land, 95%


Resulting table

IN.P0000061, Water, 10, Growth, 100, Civil, 5, 0.005

IN.P0000061, Water, 10, Growth, 100, Land, 95, 0.095

IN.P0000061, Stormwater, 90, Growth, 100, Civil, 5, 0.045

IN.P0000061, Stormwater, 90, Growth, 100, Land, 95, 0.855



Thanks

Paul
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,223,637
Messages
6,173,489
Members
452,515
Latest member
archcalx

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