Populate cells from a drop list or combo box

phillipclark

Board Regular
Joined
Sep 10, 2013
Messages
65
Good Afternoon All,

Question? How can I fill in cells from a named group that is selected from either a drop list or combo box.

Here is the code. I tried using the Macro record function but was not successful.
I have 7 different names that can be selected from the list.
Also there are 7 different named groups that based on selection need to be copied and pasted in the Sheet 2 range R50:V62

Any help would be greatly appreciated as I have not been successful on my own

Thank you
Code:
Private Sub ListBox1_Click()
 ActiveSheet.Shapes.Range(Array("ListBox1")).Select
    Sheets("Sheet3").Select
    Range("Finger_Weight").Select
    Selection.Copy
    Sheets("Sheet2").Select
    Range("R50:V62").Select
    ActiveSheet.Paste
End Sub
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Good Morning All,
Since no one has replied is this an indicator that what i am looking to be done is not possible?
 
Upvote 0
Greetings Everyone,
So I have my code running from a Button and Macro now. This is ok but i would prefer not having 7 buttons across the top of my sheet.
How do I run this code from the ComboBox1.

Code:
Sub Group4_Click()
     Sheets("Sheet3").Select
    Range("B3:F15").Select
    Selection.Copy
    Sheets("Sheet2").Select
    Range("R50:V62").Select
    ActiveSheet.Paste
    Sheets("Sheet3").Select
    Range("B3:F15").Select
    Sheets("Sheet2").Select
    Range("R68:V80").Select
       ActiveSheet.Paste
End Sub

Thank You in Advance for your help
 
Upvote 0
You can try this after populating your combobox with the names of the named ranges:

Code:
Private Sub ComboBox1_Change()

    Range(ComboBox1.Value).Copy Destination:=Sheets("Sheet2").Range("R50:V62")


End Sub

Regards,

CJ
 
Upvote 0

Forum statistics

Threads
1,214,895
Messages
6,122,128
Members
449,066
Latest member
Andyg666

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