Using drop down boxes to pull values in the same worksheet.

MarcSwift

New Member
Joined
May 21, 2011
Messages
23
Hi all,

I have a query. In A1 i have a drop down box. In this drop down box i have dates of all the sundays in the year. In columns D1 and E1, F1 and so on, i have the dates of these sundays eg. 17/7/11, 24/7/11 31/7/11.
Under each of these dates i have values (names) and when i select a date on the drop down box, i want the values which relate to the date in columns D,E,F etc to appear under the drop down box.

How do i do this?

Thanks a lot guys :)
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi MarcSwift,

Couple questions…

1. do you mean Combo Box in A1 ?



2. in A2 ?



Hello!
THanks for the reply!

I have used a list data validation in A1 and yes i want the values to appear in a2,a3,a4 etc :)

I havent used a combo box so not sure what the best way of achieving the result is.

THanks
 
Upvote 0
I think the best way is Combo Box

Let assume:

1. your data located in D1:W2 (Dates in first row & values in second row)
2. Combo Box in B1
Then this code will do what you want:
Code:
Option Explicit
Private Sub ComboBox1_Change()
    Dim Dt As Single
    Dt = ComboBox1.Value
    Range("A65536").End(xlUp).Offset(1, 0).Value = WorksheetFunction.HLookup(Dt, Range("D1:W2"), 2, False)
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

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