Vlookup

maldonadocj

Board Regular
Joined
Oct 19, 2004
Messages
103
Hello,

I need some assistance in creating a formula that removes spaces as a function within a vlookup formula. I am trying to write a vlookup formula that refers to a cell (A1) on Sheet1 to a range of columns on Sheet2. The problem is that the cells on Sheet 2 have a space in front of each entry so the vlookup formula does not "recognize" the data from cell A1. Is there a vlookup formula that can remove the spaces in front of the cell data on Sheet 2? Each cell data set contains 9 alpha or numeric digits.

Any assistance is greatly appreciated. :oops:
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
You'd be better off adding the space as part of the lookup formula...

=VLOOKUP(" "&A1,etc.)
 

maldonadocj

Board Regular
Joined
Oct 19, 2004
Messages
103
Hello njimack,

Thank you for the response. I got the #NAME error message when I utilized the formula you supplied. I also tried to utilize the ISERROR and ISNA function to overwrite the data, but this also didn't work. Any thoughts?
 

njimack

Well-known Member
Joined
Jun 17, 2005
Messages
7,764
Can you post a sample of your data and the formulae you're using?
 

maldonadocj

Board Regular
Joined
Oct 19, 2004
Messages
103
Hello Neil,

I was able to locate the problem...Your formula worked fine after that..


Cheers..

Thanks again for the assist.

C.
 

Forum statistics

Threads
1,141,678
Messages
5,707,782
Members
421,527
Latest member
Tamiwsw

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
Top