Hey all,
I am hoping I can get some guidance. VBA is something I just started getting my feet wet with so I'm really new to it. I will do my best to explain what I'm trying to accomplish.
I've created a spreadsheet that has a primary sheet and 4 additional sheets.
The first sheet has several drop down menus in column B that have the same 5 options on each of them:
Drop Down 1 - (None, Basic, Pro, Premium, Enterprise)
Drop Down 2 - (None, Basic, Pro, Premium, Enterprise)
Etc.
The additional sheets are listed as the names of the drop down menu options.
Sheet 2 = Basic
Sheet 3 = Pro
Sheet 4 = Premium
Etc.
Each of those sheets have multiple "categories" of data.
Sheet 2 - Basic Option 1, Basic Option 2
Sheet 3 - Pro Option 1, Pro Option 2
Etc.
My goal is to be able to select an option from each drop down in sheet 1 and have it populate a range of data based off the specific drop down being used and copy the specified range to the next blank row in column E of sheet 1.
Currently - the functionality works, but I am trying to refine it a bit to be more efficient. The issue right now is if I select Drop Down 1 and choose "Basic" it populates the data as intended; but if I select Drop Down 1 again and choose "Pro", it populates the data under the data that was just populated.
I'm trying to get it to work so that the data from each drop down can only be populate once, and if the value of that drop down changes - it replaces the data that drop down originally populated.
Something to note - the ranges of the options for each drop down vary in row size (but not column size) so Drop Down 1-Option 1 may have a range of A2:G12 but Option 2 would have the range of A2:G15.
Lastly - if the option "None" is selected on any of the drop downs - it would remove the copied range.
Is there a way to do this?
Here is the script I've written. It works perfectly fine - but I know full well it could be improved.
This the code in the Module:
This is the code in the Worksheet:![]()
Please Login or Register to view this content.
Thank you in advance for anyone who can offer help.![]()
Please Login or Register to view this content.
Bookmarks