Question: Answer the question by writing a VBA subroutine to create a new worksheet for each category in column B with the corresponding product and price
Answer the question by writing a VBA subroutine to create a new worksheet for each category in column B with the corresponding product and price data. Full details in second picture.


Information on all products The Data worksheet in the file Product Info.xlsx lists information on various software packages a company sells. Each product has an associated category listed in column B. Write a sub that creates a worksheet for each category represented in the list, with the name of the worksheet being the category, such as Business. Place a button on the Data worksheet to execute your code. Place instructions to the user in this worksheet. For each category worksheet, the sub should enter the product names and their prices in columns A and B B, starting in row 4. Each category worksheet should have an appropriate label, such as "Products in the Business Category" in cell A1; it should have the labels "Product" and "Price" in cells A3 and B3 respectively; and the column width for column A should be the same as the column width of column A in the Data worksheet. Note: There are only 3 categories in the worksheet, but your code should work no matter how many categories (or products) there are. Imagine that this code was tested on a different list ofproducts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
