Hi all,
I'm mediocre at best with VBA so need quite a lot of help and may be asking questions to understand better.
I need a macro that does the following:
User will input the information in the table below. User will input a category (Fruit) and an identifying label (Color).
User will then click a button tied to the macro. The macro will return the filled out table in a newly created sheet.
For the table created by the macro, the cells will need to have all borders filled.
Information on the outputted table will be based on another table (containing ingredients) in another sheet.
Input from User:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Fruit[/TD]
[TD]Color (ID)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]Green[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[/TR]
</tbody>[/TABLE]
User then Clicks Button
Hidden Table Already Filled Out in Another Sheet:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Fruit[/TD]
[TD]Ingredient[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Apple[/TD]
[TD]Flour[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Apple[/TD]
[TD]Sugar
[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Apple[/TD]
[TD]Cinnamon[/TD]
[/TR]
</tbody>[/TABLE]
Output from Macro in Newly Created Sheet:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Item #
[/TD]
[TD]Fruit[/TD]
[TD]Color[/TD]
[TD]Ingredient [/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]Apple[/TD]
[TD]Green[/TD]
[TD]Flour[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]Green[/TD]
[TD]Sugar[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]Apple[/TD]
[TD]Green[/TD]
[TD]Cinnamon[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD]Flour[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD]Sugar[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]6[/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD]Cinnamon[/TD]
[/TR]
</tbody>[/TABLE]
I'm mediocre at best with VBA so need quite a lot of help and may be asking questions to understand better.
I need a macro that does the following:
User will input the information in the table below. User will input a category (Fruit) and an identifying label (Color).
User will then click a button tied to the macro. The macro will return the filled out table in a newly created sheet.
For the table created by the macro, the cells will need to have all borders filled.
Information on the outputted table will be based on another table (containing ingredients) in another sheet.
Input from User:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Fruit[/TD]
[TD]Color (ID)[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]Green[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[/TR]
</tbody>[/TABLE]
User then Clicks Button
Hidden Table Already Filled Out in Another Sheet:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Fruit[/TD]
[TD]Ingredient[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Apple[/TD]
[TD]Flour[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Apple[/TD]
[TD]Sugar
[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Apple[/TD]
[TD]Cinnamon[/TD]
[/TR]
</tbody>[/TABLE]
Output from Macro in Newly Created Sheet:
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Item #
[/TD]
[TD]Fruit[/TD]
[TD]Color[/TD]
[TD]Ingredient [/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1[/TD]
[TD]Apple[/TD]
[TD]Green[/TD]
[TD]Flour[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]2[/TD]
[TD]Apple[/TD]
[TD]Green[/TD]
[TD]Sugar[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]3[/TD]
[TD]Apple[/TD]
[TD]Green[/TD]
[TD]Cinnamon[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]4[/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD]Flour[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]5[/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD]Sugar[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]6[/TD]
[TD]Apple[/TD]
[TD]Red[/TD]
[TD]Cinnamon[/TD]
[/TR]
</tbody>[/TABLE]