Adding validation in excel according to another column from another sheet

javadeb

New Member
Joined
May 12, 2022
Messages
6
Office Version
  1. 2021
Platform
  1. Windows
I have a excel sheet called data with 3 columns: id, name
I have another sheet called list with 3 columns: id, name
I have made a data validation on column name in data sheet with this

> formula: =list!A$2:$A$37000

its working fine and gives me a drop down list from my names in list and another formula for column id in my data sheet

> formula: IFERROR(VLOOKUP(B${i},list!A1:B10000,2, FALSE),"")

problem is that if some rows in list sheet have same names, if I change value in drop down list in data sheet, id wont change. What should I change to make it work?

[example file][1]


[1]: Deleted
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
I cannot get to that site as I get a warning "This webpage is a known malicious webpage." So I would suggest that you use a more respected site such as OneDrive, GoogleDrive, DropBox.
 
Upvote 0
I cannot get to that site as I get a warning "This webpage is a known malicious webpage." So I would suggest that you use a more respected site such as OneDrive, GoogleDrive, DropBox.
Sorry I have uploaded it to dropbox
 
Upvote 0
How y=would you know which is the right value to return for AB?
 
Upvote 0
In that case can you post some sample data with the store.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
In that case can you post some sample data with the store.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
test.xlsx
ABC
1idnamestore
21ABmr jack
3
4
5
6
data
Cell Formulas
RangeFormula
A2A2=IFERROR(VLOOKUP(B2,list!A1:C10000,2, FALSE),"")
C2C2=IFERROR(VLOOKUP(B2,list!A1:C10000,3, FALSE),"")
Cells with Data Validation
CellAllowCriteria
B2List=list!A$2:$A$37000


test.xlsx
ABC
1nameidstore
2AB1mr jack
3AB2padd
4VX3mr jack
5WE4mr jack
6
list
 
Upvote 0
Using Vlookup like that you are never going to get padd as the store. You would need to use a dropdown in col C to select the store.
 
Upvote 0
Using Vlookup like that you are never going to get padd as the store. You would need to use a dropdown in col C to select the store.
How can I do that to if I select another store id should change?
Could you please help me!
 
Upvote 0

Forum statistics

Threads
1,215,353
Messages
6,124,462
Members
449,163
Latest member
kshealy

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