Vlookup overriding a drop-down list

Alenz

New Member
Joined
Nov 20, 2016
Messages
10
I have a drop-down list in both cells A1 and A2 each with different values. I am trying to let a vlookup override the drop-down list in A2. For example when you select 'Leave' in A1, A2 must automatically choose a specific value from the drop-down list in A2 that cannot be changed.

I tried a vlookup as follows: Say A1 source data is AA1:AA5 and A2 source data is BB1:BB5. I created another column AB1:AB5, which is equal to the corresponding source data in BB1:BB5 (AB1=BB1, etc.). So the vlookup in A2 would go: =vlookup(A1,$AA1:$AB5,28,FALSE). However, an error message pops up saying "This value doesn't match the data validation restrictions defined for this cell." I thought that since the vlookup fills A2 with a value taken directly from the source data BB1:BB5 (as it is equals to), it would see it as a valid value but it does not.

Hope my explanation is clear. Any ideas?
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
=vlookup(A1,$AA1:$AB5,28,FALSE)
The range is only two columns. It must be an error. $AB5 should be $BB or 28 should be 2.
You will set a formula in A2, I think A2 does not be set Data Validation. Is ColumnAB necessary?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,325
Members
452,635
Latest member
laura12345

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