This is my first time posting, however I have used this website a lot in my very short and novice career writing some very basic Macro's into the excel files I use at work. It has been incredibly handy, so I am very thankful!
My current problem.... I have been using "push button" macros to fill data from one page to another. This is pretty easy for me and i feel is a "safe" method for those of us who are self-teaching (via google).
This time, I want to essentially do the same thing but with a drop down list, instead of the push button. However, I am unsure how to write the macro to be conditional based on what is selected from the drop down.
The drop down list has three selections. Each selection will copy data from a different Sheet inside the workbook.
For example (i work in the fashion industry)
I have three size ranges to select from the drop down list. 6-18 XXS-XXL XS/S-L/XL
Based on selecting one of these size ranges they all correspond to a Sheet in the workbook where i will pull information from. In order as above they correspond to Sheet "G1", "G2", and G3. Based on the drop down selection, for example 6-18, will copy data from sheet "G1" to another Sheet named "Parameter". I also need to be able to define the range of cells as i am only copying some of the data from sheet G1, to the parameter page.
Please see what I have so far...
Sub DropDown1_Change()
'DropDown Select. 6-18
'Activate the destination worksheet
Sheets("PARAMETER").Activate
'Select the target range
Range("C10:P67").Select
'sbClearCells()
Range("C10:P67").Clear
'Copy the data
Sheets("G1").Range("C10:P67").Copy
'Activate the destination worksheet
Sheets("PARAMETER").Activate
'Select the target range
Range("C10:P67").Select
'Paste in the target destination
ActiveSheet.Paste
Application.CutCopyMode = False
'DropDown Select. XS/S-L/XL
'Activate the destination worksheet
Sheets("PARAMETER").Activate
'Select the target range
Range("C10:P67").Select
'sbClearCells()
Range("C10:P67").Clear
'Copy the data
Sheets("G2").Range("C10:P67").Copy
'Activate the destination worksheet
Sheets("PARAMETER").Activate
'Select the target range
Range("C10:P67").Select
'Paste in the target destination
ActiveSheet.Paste
Application.CutCopyMode = False
'DropDown Select. XXS-XXL
'Activate the destination worksheet
Sheets("PARAMETER").Activate
'Select the target range
Range("C10:P67").Select
'sbClearCells()
Range("C10:P67").Clear
'Copy the data
Sheets("G3").Range("C10:P67").Copy
'Activate the destination worksheet
Sheets("PARAMETER").Activate
'Select the target range
Range("C10:P67").Select
'Paste in the target destination
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
Currently it is running the code, but it is only running the last paragraph of script. I need a bit of help to get it to recognize the different selection.
Any help would be greatly appreciated.
Thanks so much, Katherine