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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
You'd be better off adding the space as part of the lookup formula...

=VLOOKUP(" "&A1,etc.)
 
Upvote 0
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?
 
Upvote 0
Hello Neil,

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


Cheers..

Thanks again for the assist.

C.
 
Upvote 0

Forum statistics

Threads
1,214,657
Messages
6,120,769
Members
448,991
Latest member
Hanakoro

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