Linking 2 comboboxes Column A and Column F

Excelnewbie001

Board Regular
Joined
Jan 25, 2017
Messages
79
I have 2 comboboxes that I want to link Column A is Dates and Column F is the data. For instance when I click on combobox2 A2 it must show combobox3 F2 is value. I have tried the following code but it does not work -I have set the rowsources correctly as it shows both fields but when selecting it doesnt show the corresponding linked columns data. The data ONLY starts in A2 and F2. Form controlled comboboxes

This is the code I have. Any help appreciated.

Code:
ComboBox3.Value = Cells(ComboBox2.ListIndex + 1, 6)
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Column A is the date Column F is the sales for the day so A2 =F2 (Sales for the day)
Anyone please I need to get this combobox working.....its on a Userform thats linked to a sheet. The comboboxes are linked with the sheet rowsource on the combobox settings.....My problem is in this code
Code:
Private Sub ComboBox2_Change()
ComboBox3.Value = Cells(ComboBox2.ListIndex + 1, 6)
End Sub
 
Last edited:
Upvote 0
Fixed it myself....Rowsource property cannot start on A2 -Always 1 -changed the rowsource to 1 and the form control works now
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,383
Members
448,956
Latest member
JPav

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