FarzanaSaleem
Programmer
In an Excel File, there are two sheets; Sheet1 and Sheet2.
Sheet1 has two Columns:
Column A = JobCode
Column B = Description
JobCode is a named range and refers to =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,1)
Description is a named range and refers to =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,2)
Sheet2 is as follows:
A1 = JobCode
A2 = Data -> Validation -> List (Source = JobCode)
B1 = Description
B2 = =IF(ISNA(VLOOKUP(A2,Description,2,FALSE)),"",VLOOKUP(A2,Description,2,FALSE))
Now when any JobCode is selected in Sheet2->Column A, its corresponding description is shown in Sheet2->Column B.
What is needed is to show both JobCode and Description Columns in JobCode Combo and when the user selects any one, JobCode is to be stored in JobCode Column.
Let's say, entries are as follows:
Sheet1:
A1 = JobCode
A2 = MGR
A3 = ACT
A4 = PROG
B1 = Description
B2 = Manager
B3 = Accountant
B4 = Programmer
Sheet2, JobCode Combo box should show both JobCode and Description like:
MGR Manager
ACT Accountatn
PROG Programmer
When user selects first row, then MGR should be stored in the cell.
I tried to change the Data->Validation->List->Source from JobTitle to Description but got the following error message:
The List Source must be a delimited list, or a reference to single row or column
Sheet1 has two Columns:
Column A = JobCode
Column B = Description
JobCode is a named range and refers to =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,1)
Description is a named range and refers to =OFFSET(Sheet1!$A$2,0,0,COUNTA(Sheet1!$A:$A)-1,2)
Sheet2 is as follows:
A1 = JobCode
A2 = Data -> Validation -> List (Source = JobCode)
B1 = Description
B2 = =IF(ISNA(VLOOKUP(A2,Description,2,FALSE)),"",VLOOKUP(A2,Description,2,FALSE))
Now when any JobCode is selected in Sheet2->Column A, its corresponding description is shown in Sheet2->Column B.
What is needed is to show both JobCode and Description Columns in JobCode Combo and when the user selects any one, JobCode is to be stored in JobCode Column.
Let's say, entries are as follows:
Sheet1:
A1 = JobCode
A2 = MGR
A3 = ACT
A4 = PROG
B1 = Description
B2 = Manager
B3 = Accountant
B4 = Programmer
Sheet2, JobCode Combo box should show both JobCode and Description like:
MGR Manager
ACT Accountatn
PROG Programmer
When user selects first row, then MGR should be stored in the cell.
I tried to change the Data->Validation->List->Source from JobTitle to Description but got the following error message:
The List Source must be a delimited list, or a reference to single row or column