VLOOKUP can't use value from formula for lookup value?

PatRichard

New Member
Joined
Dec 29, 2018
Messages
16
Office Version
  1. 365
Platform
  1. Windows
I have a product number that I use multiple cells to grab various characters from. So, example is UI1950202TB, and then one cell grabs the 'U', next cell grabs the 'I', etc. I'm trying to then use VLOOKUPs to take the values of those cells and populate others. It seems that for cells where the computed value is a number, it doesn't work. But cells where the computed value is letters, works fine.

If I hard code the numbers in those cells instead of calculating by using MID(), the VLOOKUPs work fine. It's just when I use a formula to determine their value that the numeric ones fail.

Ideas on workarounds?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Upvote 0
MID formulas generate text value. The match range of your lookup tables are mostly numbers. So the MID outputs must be converted to numbers. What follows does just that.


D6 of Input >>

=IFERROR(VLOOKUP(Data!$I$2,Data!$A$2:$B$7,2,0),"")

D7 of Input >>

=IFERROR(VLOOKUP(Data!$J$2,Data!$A$10:$B$28,2,0),"")

D8 of Input >>

=Data!$K$2+0

D9 of Input >>

=IFERROR(VLOOKUP(Data!$L$2+0,Data!$A$31:$B$36,2,0),"")

D10 of Input >>

=IFERROR(VLOOKUP(Data!$M$2+0,Data!$A$39:$B$52,2,0),"")

D11 of Input >>

=IFERROR(VLOOKUP(Data!$N$2+0,Data!$A$55:$B$65,2,0),"")

D12 of Input >>

=IFERROR(VLOOKUP(Data!$O$2+0,Data!$A$68:$B$75,2,0),"")

D13 of Input >>

=IFERROR(VLOOKUP(Data!$P$2+0,Data!$A$78:$B$89,2,0),"")

D14 of Input >>

=IFERROR(VLOOKUP(Data!$Q$2,Data!$A$92:$B$126,2,0),"")
 
Upvote 0
Solution
Ah - I was overthinking it. That makes more sense. And your formulas are simpler and shorter than what I had. Thank you very much!
 
Upvote 0
You are welcome.

The original poster is sharing his excel file for anyone to use. I downloaded it the other day to use.

I can confirm that this formula is not working correctly:

=IFERROR(VLOOKUP(Data!$M$2+0,Data!$A$39:$B$52,2,0),"")

It only produces a result if the data in the field is a number. Letters are ignored. For example 0 works as expected. However A or B and etc does not.

Any ideas?

Excel version:
Microsoft® Excel® LTSC MSO (16.0.14332.20279) 32-bit
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,690
Members
449,117
Latest member
Aaagu

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