Change Cell Value based on ActiveX drop down

excelenergy

Board Regular
Joined
Jun 7, 2012
Messages
142
Hey

I have added another dropdown box to a project containing clothing brands I'm working on. This time I'm trying to change the value of a cell, based on the selection in the drop down.

So similarly to another post I made where I wanted to changed the title of a chart based on the drop down, the goal here is to change the value of a cell based on the drop down selection. So I was thinking of one of two ways...

First is this:
Code:
Private_Sub DropDown11_Change()
=VLookup(not sure how to reference a value of an active x dropdown,Sheet3!A:E,2,0)
Range("C17").Value = DropDown11.Value
End Sub

Or
Code:
Private Sub DropDown11_Change()
Dimdd As DropDown
Set dd = ActiveSheet
ActiveSheet.Cell("C17").Activate
ActiveCELL = dd.List(dd.ListIndex)
End Sub


My post regarding changing the title of a chart based on an active X drop down is here, incase there is a way to combine both of these vba script or if anyone wanted to reference the other one as well:
https://www.mrexcel.com/forum/excel-questions/1052307-match-match-if.html
 
Last edited:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Recently I have also just tried it like this, didn't seem to work

Code:
Private_Sub DropDown11_Change()
Range("C17") = DropDown11.Value.Select
ActiveCell.Formula = "=VLookup(DropDown11,'Sheet3'!A:B,0)"
End Sub





Hey

I have added another dropdown box to a project containing clothing brands I'm working on. This time I'm trying to change the value of a cell, based on the selection in the drop down.

So similarly to another post I made where I wanted to changed the title of a chart based on the drop down, the goal here is to change the value of a cell based on the drop down selection. So I was thinking of one of two ways...

First is this:
Code:
Private_Sub DropDown11_Change()
=VLookup(not sure how to reference a value of an active x dropdown,Sheet3!A:E,2,0)
Range("C17").Value = DropDown11.Value
End Sub

Or
Code:
Private Sub DropDown11_Change()
Dimdd As DropDown
Set dd = ActiveSheet
ActiveSheet.Cell("C17").Activate
ActiveCELL = dd.List(dd.ListIndex)
End Sub


My post regarding changing the title of a chart based on an active X drop down is here, incase there is a way to combine both of these vba script or if anyone wanted to reference the other one as well:
https://www.mrexcel.com/forum/excel-questions/1052307-match-match-if.html
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,262
Members
452,627
Latest member
KitkatToby

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