Drop Down

tbrynard01

Board Regular
Joined
Sep 20, 2017
Messages
129
Office Version
  1. 365
Platform
  1. Windows
I use Excel 2016

Would like to know if you can create a drop down list that has two columns that will default on value

Column A Column B
Arbor Village AV

If I select Arbor Village I only want AV to appear in the cell?

Hope that makes sense help will be appreciated
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
this is one way
Book1
ABCDEF
1Col ACol BTwnArea
2Arbor VillageAVArbor VillageAV
3Jobs TwnAB
4My TwnAC
Sheet1
Cell Formulas
RangeFormula
B2B2=IF(A2="","",VLOOKUP(A2,E2:F4,2,FALSE))
Cells with Data Validation
CellAllowCriteria
A2List=$E$2:$E$4
 
Upvote 0
this is one way
Book1
ABCDEF
1Col ACol BTwnArea
2Arbor VillageAVArbor VillageAV
3Jobs TwnAB
4My TwnAC
Sheet1
Cell Formulas
RangeFormula
B2B2=IF(A2="","",VLOOKUP(A2,E2:F4,2,FALSE))
Cells with Data Validation
CellAllowCriteria
A2List=$E$2:$E$4
Thanks, I think I'm missing something as the list still puts the full name when I select it and not the abbreviated one?
 
Upvote 0
My mistake completely misunderstood the question
test1.xlsm
ABCD
1Select TwnTwnTwnSH
2ABArbor VillageAV
3Jobs TwnAB
4My TwnAC
Sheet1
Cells with Data Validation
CellAllowCriteria
A2List=$C$2:$C$4


Whateveer sheet you are using , click on View code insert this , adjust as needed, save and save workbook as macro-enabled workbook
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LookupTable As Range
Set LookupTable = ThisWorkbook.Worksheets("Sheet1").Range("C2:D4") ' Change here to suit your range lookup
    If Not Intersect(Target, Range("A:A")) Is Nothing Then
        Application.EnableEvents = False
        Target = Application.WorksheetFunction.VLookup(Target.Value, LookupTable, 2, False)
        Application.EnableEvents = True
    End If
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

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