Combining a formula and a drop down list.

dkehler

New Member
Joined
Oct 15, 2009
Messages
35
Is it possible for me to use a Vlookup in a cell in combination with a drop down list. The purpose would be to allow changing the Vlookup answer by selecting from the list.
If it is possible to do so, please provide me with instructions.
I already know how to create vlookup formulas and drop down lists, I just do not know how to combine them, because when I try to add the formula to the cell, I get the message that it does not meet the validation criteria. Thank you for any help.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi Dkehler,

It's unclear how you want these to work together. Are you trying to change what is looked up dependent of what is selected from the LoV?

You can do this with Names and INDIRECT. e.g.

Cell B2 is a Data Validation with a source of =$F$1:$G$1
F1:G4 are selected and have a Formulas, Create from Selection, Top Row names so I end up with entries in the Name Manager for Dog and Cat, each with their own list.

In D2 I have another Data Validation LoV with source =INDIRECT($B$2)
so if you selecet Dog in B2 you get the named range Dog so are offered Rover, Dexter and Max but if you select Cat in B2 then D2 offers Tifer, Fluffy and Tom.

BCDEFG
1Dog or Cat?Select NameDogCat
2CatFluffyRoverTiger
3DexterFluffy
4MaxTom

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet6


Workbook Defined Names
NameRefers To
Cat=Sheet6!$G$2:$G$4
Dog=Sheet6!$F$2:$F$4

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Thank you. That is not exactly what I am wanting to do, but it is an application that I may be able to use on another spreadsheet. Let me try to give a better explanation of what I would like to do:

I would like for cell H1 to equal D1, BUT if H1 needed to be changed, it could then be done so from a drop down list.
 
Upvote 0
A cell can be data or a formula (unless you resort to some VBA in the background) so H1 can either be =D1 or a formula; it can't be an LoV.

To do this the LoV would need to be elsewhere. Here I have it as K1 with selection of K2:K5. If the empty option is selected (or you use the Delete key in K1) then H1=D1, otherwise it takes the K1 value.

DEFGHIJK
13333
2A
3B
4C
5

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
H1=IF(K1="",D1,K1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,215
Members
448,874
Latest member
b1step2far

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