Trying VLOOKUP ActiveX Combolist value

ike_barrett

New Member
Joined
Apr 2, 2019
Messages
1
So I have database that has an employee table/sheet "Employees" with three columns...EmployeeID, FirstName, LastName. Most of the data only uses EmployeeID...but I don't want users to have to remember employee IDs when using it.

So, I use an ActiveX ComboBox to display the three columns and transmt the value to the linkedCell (in this case C3). The value shows correctly.

Then I try to show the names in D3 and E3, but keep getting #NA .

I used =INDEX(Employees,MATCH(C3,Employees[Employee_ID],0),2)

If I simply replace C3 with my employeeID number it works...also, if I change my employeeIDs to letters instead of numbers it works...but I can't do that.

I also tried substituting C3 with Indirect("C3") and that doesn't work (although it does work else where to display the EmployeeID).

Any direction you can provide would be great.
 

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)
Your formula works fine for me provided

EITHER
BOTH values are text

Excel 2016 (Windows) 32 bit
C
D
3
12345
4
joe =INDEX(Employees,MATCH(C3,Employees[Employee_ID],0),2)
Sheet: Sheet8

Excel 2016 (Windows) 32 bit
A
B
C
1
Employee_IDFirst NameLast Name
2
12345joeBrown
3
23456​
peterSmith
4
34567​
jennySilvers
Sheet: Employees

OR
BOTH values are numbers

Excel 2016 (Windows) 32 bit
C
D
3
12345​
4
joe =INDEX(Employees,MATCH(C3,Employees[Employee_ID],0),2)
Sheet: Sheet8

Excel 2016 (Windows) 32 bit
A
B
C
1
Employee_IDFirst NameLast Name
2
12345​
joeBrown
3
23456​
peterSmith
4
34567​
jennySilvers
Sheet: Employees


Where is the mismatch?
You say that "If I simply replace C3 with my employeeID number it works"
- so I think that the problem is in C3 rather than the table

Try this simple formula
=T(C3)

It returns nothing if the cell contains a number and returns 12345 (in above example) if cell contains text

If I am correct then your formual can be changed to
=INDEX(Employees,MATCH(VALUE(C3),Employees[Employee_ID],0),2)
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,838
Members
449,193
Latest member
MikeVol

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