Excel VBA to Create and Autofill New Table Part 2

Slazar

New Member
Joined
Aug 28, 2015
Messages
17
Hi all,

Please help!
I need a macro that does the following:

User will input the information in the table below.

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.

Example:

Apple is a Fruit. For Apples, there are two cooking methods (Bake and Fry) with associated pictures 1 and 2 (which are links to another sheet displaying the photo). Part of the outputted table will display all cooking methods, with all associate pictures, for all apples inputted from the user. So it shows the cooking methods for Green Apple and for Red Apple. The outputted table will have empty columns for comments and updates.


Input from User:

ABC
1
CategoryTypeColor (ID)
2Fruit
AppleRed
3FruitAppleGreen
4VegetableBroccoliGreen
5VegetableBroccoliPurple
6MeatChickenWhite

<tbody>
</tbody>



User then Clicks Button

Hidden Table Already Filled Out in Another Sheet:
ABCD
1
CategoryTypeCooking MethodPicture
2FruitAppleBake1
3FruitAppleFry2
4VegetableBroccoliBake3
5VegetableBroccoliSteam4
6VegetableBroccoliMicrowave5
7MeatChickenBake6
8MeatChickenGrill7
9MeatChickenFry8

<tbody>
</tbody>



Output from Macro in Newly Created Sheet:
ABCDEFGH
1Item #CategoryTypeColor (ID)Cooking MethodUpdatesCommentsPicture
21FruitAppleRedBake1
32FruitAppleRedFry2
43FruitAppleGreenBake1
54FruitAppleGreenFry2
65VegetableBroccoliGreenBake3
76VegetableBroccoliGreenSteam4
87VegetableBroccoliGreenMicrowave5
98VegetableBroccoliPurpleBake3
109VegetableBroccoliPurpleSteam4
1110VegetableBroccoliPurpleMicrowave5
1211MeatChickenWhiteBake6
1312MeatChickenWhiteGrill7
1413MeatChickenWhiteFry8

<tbody>
</tbody>
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Can anyone help with this macro? I tried to take a similar macro and edit it but I can't seem to figure it out.
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,334
Members
449,077
Latest member
Jocksteriom

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