Creating a specific table using VBA

HACZN12

New Member
Joined
Apr 20, 2017
Messages
14
To Whom it Concerns,
I’m looking to create a 3 layered table which to start withwould look like follows:

[TABLE="width: 306"]
<tbody>[TR]
[TD="width: 414, bgcolor: transparent, colspan: 6"]Table
[/TD]
[/TR]
[TR]
[TD="bgcolor: #BFBFBF, colspan: 6"]Design
[/TD]
[/TR]
[TR]
[TD="bgcolor: #BFBFBF, colspan: 6"]Construction
[/TD]
[/TR]
[TR]
[TD="bgcolor: #BFBFBF, colspan: 6"]Delay
[/TD]
[/TR]
</tbody>[/TABLE]


The table should link to 3 fields within the spreadsheet for


Design:
Construction:
Delay:

Once the values are placed into the fields the table shouldautomatically create the appropriate number of rows, for example if Design was1, Construction was 3 and Delay was 3; the table would look as follows:

[TABLE="width: 306"]
<tbody>[TR]
[TD="width: 414, bgcolor: transparent, colspan: 6"]Table

[/TD]
[/TR]
[TR]
[TD="bgcolor: #BFBFBF, colspan: 6"]Design
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]1
[/TD]
[TD="bgcolor: transparent"]Fomula 1
[/TD]
[TD="bgcolor: transparent"]Formula 2
[/TD]
[TD="bgcolor: transparent"]Formula 3
[/TD]
[TD="bgcolor: transparent"]Fomula 4
[/TD]
[TD="bgcolor: transparent"]Fomula 5
[/TD]
[/TR]
[TR]
[TD="bgcolor: #BFBFBF, colspan: 6"]Construction
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]2
[/TD]
[TD="bgcolor: transparent"]Fomula 1
[/TD]
[TD="bgcolor: transparent"]Formula 2
[/TD]
[TD="bgcolor: transparent"]Formula 3
[/TD]
[TD="bgcolor: transparent"]Fomula 4
[/TD]
[TD="bgcolor: transparent"]Fomula 5
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3
[/TD]
[TD="bgcolor: transparent"]Fomula 1
[/TD]
[TD="bgcolor: transparent"]Formula 2
[/TD]
[TD="bgcolor: transparent"]Formula 3
[/TD]
[TD="bgcolor: transparent"]Fomula 4
[/TD]
[TD="bgcolor: transparent"]Fomula 5
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]4
[/TD]
[TD="bgcolor: transparent"]Fomula 1
[/TD]
[TD="bgcolor: transparent"]Formula 2
[/TD]
[TD="bgcolor: transparent"]Formula 3
[/TD]
[TD="bgcolor: transparent"]Fomula 4
[/TD]
[TD="bgcolor: transparent"]Fomula 5
[/TD]
[/TR]
[TR]
[TD="bgcolor: #BFBFBF, colspan: 6"]Delay
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]6
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]



I would also want to ensure the numbering on the left handsite automatically populated (in this instance it should read from 1-7), andthat specific formula are input into each of the columns and dropped down(which is difficult as the banners for construction and delays segregate thetable into three parts).


I’ve looked online and done a lot of research; this is apretty difficult macro to put together so any help would be much appreciated,


Let me know if you require further information, happy toelaborate


Many Thanks

Hacz
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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