VLOOKUP Question

davygryan

Board Regular
Joined
May 26, 2010
Messages
150
I have a sheet that I am trying to use to pull data based on a chemical name.

For this I am using VLOOKUP.
However I am having a problem in that if someone enters the chemical name incorrectly it doesnt pull up any data.

An example is if some one enters "Dioxane" as the chemical the VLOOKUP won't give any data as the exact name for the chemical is "1,4 Dioxane".

Is there any way of getting around this so that if someone doesn't enter the full name it will still return the correct data
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi there,

New to this forum and puzzling my way through so hopefully I have this right :eeek:

You could try using MATCH and INDEX instead. If I understand correctly then an example might be
Code:
=INDEX('Range containing data to return',MATCH( "*"&'cell reference that name is input in','Range containing chemical names to compare against',FALSE),1)

This should return an entry for any chemical name that has other characters preceding it.
 
Upvote 0
I have a sheet that I am trying to use to pull data based on a chemical name.

For this I am using VLOOKUP.
However I am having a problem in that if someone enters the chemical name incorrectly it doesnt pull up any data.

An example is if some one enters "Dioxane" as the chemical the VLOOKUP won't give any data as the exact name for the chemical is "1,4 Dioxane".

Is there any way of getting around this so that if someone doesn't enter the full name it will still return the correct data

You could use a wildcard VLOOKUP. But I think you'd still have a problem if the name was mispelled.

VLOOKUP("*" & LOOKUPVALUE & "*",......
 
Upvote 0
You could use a wildcard VLOOKUP. But I think you'd still have a problem if the name was mispelled.

VLOOKUP("*" & LOOKUPVALUE & "*",......


That works a treat thanks very much.

Next problem I have is if i have more than 1 chemical with the same name in part of the name is there any way of getting the extra values returned because at the moment it will only return the first chemical that has for example "ethanol" in the name and none of the rest of them
 
Upvote 0
That works a treat thanks very much.

Next problem I have is if i have more than 1 chemical with the same name in part of the name is there any way of getting the extra values returned because at the moment it will only return the first chemical that has for example "ethanol" in the name and none of the rest of them

I don't think you can achieve that with VLOOKUP. You may want too try the INDEX MATCH method mentioned in Post #2. Perhaps that will work for you.
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,472
Members
452,915
Latest member
hannnahheileen

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