VLOOKUP

slamtheman

New Member
Joined
May 19, 2003
Messages
5
Quick question. I have to look up text strings to return a definition. For example:

I am reporting a paramter called say "Phone calls through CSR"

now I want to use VLOOKUP to find this in another table, and return the definition from that table.

However, it's in the table as " Phone Calls through CSR" (in other words, there are whitespaces, and possibly case mismatches)

With VLOOKUP, this is returning "n/A" unless the match is EXACT. My question is, is there anyway to either modify VLOOKUP, or use another function to quickly match my terms to their definition, even if there are slight descrepancies in the text strings. Thanks for your help in advance.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You'll need to clean up the strings you're looking up, and apply the same changes to the lookup column in your source. I find it helpfuld to replace all the spaces and make everything upper case with the following:

=UPPER(SUBSTITUTE(A1," ",""))

I don't know what other unusual circumstances you may have, but you can clearly replace anything else that may be causing problems in both places.
 
Upvote 0
thanks! unfortunately, Im lazy and was just hoping there was something that could be done to avoid the 'cleaning up' process (we're talking ALOT of clean up). Oh well. Thanks anyways, appreciate the prompt response.
 
Upvote 0
You can use "=TRIM(YourRange)" to get rid of extra spaces and "=CLEAN(YourRange)" to get rid of non-printable characters such as hard-returns.
 
Upvote 0
Howdy, you could use a macro to clean all of your constants, looping through them, or you can use an array formula, something like (d or e):
Book5
ABCDE
1BlaH2PhonecallsthroughCSR44
2PhoneCallsthroughCSR4Blah22
Sheet1 (2)


Hope one of these possibilites helps.
 
Upvote 0

Forum statistics

Threads
1,221,692
Messages
6,161,336
Members
451,697
Latest member
pedroDH

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