I have a worksheet with three tabs. Client facing ‘Form”, “List” to paste in CRM extracted information, and “Data” to house any needed interim data.
The pertinent information extracted from the CRM is two columns, Column A the ‘Regions’ and Column C the ‘Item Names’.
I want to use VBA code to take the information from “List” and display it on “Form” with the Region Name then in the same column list the items for that region. Leave a space and continue.
Example:
Airport
Toy Robot
Uno Card Game
Commercial
Dinosaur Figures
Glass Marbles
Kids Makeup Kit
Lego Bricks
Nerf Gun
PlayDoh Can
PlayDoh Toolkit
Residential
Deck Of Cards
Dino Egg
Dinosaur Figures
Glass Marbles
Kids Makeup Kit
Lego Bricks
Mini Ping Pong
Monopoly
Downtown
Lego Bricks
Nerf Gun
PlayDoh Can
I’ve used VBA code for figure out how many items are listed for each region and store that in tab “Data”. Column A for the region and Column B for the number of items listed for that region.
For sample:
Airport 2
Commercial 7
Residential 8
Downtown 3
Next I have code that setups the Region Names, leaving space for the Items.
Airport
Commercial
Residential
Downtown
Now I’m trying to figure out how to add the accompanying Item Names under each Region on tab “Form”.
I’ve tried using Index Match with a loop, but it’s not looping the right amount of times, nor taking the empty rows into consideration.
Peter Koebel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1