data validation and cell population

PinkHinky

Board Regular
Joined
Jul 1, 2008
Messages
50
In column E, I have validated those cells using data validation allowing only items from a list to be populated. There are 7 physician names on this list. In column F I have an area for their physician number to go. Each physician has a three digit physician number exclusive to them. What I'm trying to do is when I select a physician from Column E's drop down box, I would like to have in the corresponding row in Column F, their unique physician number populating the cell. How would I go about doing this? I'm an intermediate level excel user.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Vlookup doesn't work for this. Is there another method? I've tried using the "if" formula and I need to know how to combine multiple "ifs" to make this work.
 
Upvote 0
If VLOOKUP doesn't work, you're not telling us the whole story. You could, of course use a Change Event (VBA Code).
Code:
Private Sub WorkSheet_Change(ByVal Target as Range)
If Target.Count <> 1 Then Exit Sub
If Target Column <> 5 Then Exit Sub
Select Case UCase(Target)
     Case "PHSY1" : Cells(Target.Row,6) = "123"
     Case "PHSY2" : Cells(Target.Row,6) = "456"
     'etc
     Case Else: 
End Select
End Sub

lenze
 
Upvote 0

Forum statistics

Threads
1,214,584
Messages
6,120,387
Members
448,957
Latest member
Hat4Life

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