vlookup woes

mrxwanttobe

New Member
Joined
Apr 27, 2018
Messages
23
Office Version
  1. 2007
Platform
  1. Windows
Good Morning

So I have two sheets. both have Zip codes but on one sheet some of them are 00000,some are 00000000 and some are 00000-000. the other sheet are all 5 position 00000. for them to match I'm using =LEFT(A1,5) and it shortens them all to 5 positions but then Vlookup no longer works like maybe it's changing the format when I shorten to 5 positions. Any help would really be appreciated.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Left returns a string rather than a number, so you can use LEFT(A1,5)*1 to turn it back into a number
 
Upvote 0
So I tried both the =VALE and the Left with the *1 and both still drop the leading zero. Any more thoughts?
 
Upvote 0
If your values have a leading 0 then they are either text, or they are numbers that are formatted to show leading 0.
On the lookup table put this in a blank cell =istext(A1) where A1 is a cell in the 1st column of your lookup table.
 
Upvote 0
Did this come TRUE from Sheet1 (with 00000-0000) or Sheet2 (with 00000) or both? please also check if there are any space character present.
 
Upvote 0
In that case they are text, not numbers, so there shouldn't be a problem.
What is you vlookup formula?
 
Upvote 0
Looks like I got it. Have to format the existing columns to Number/custom 00000. the I could get the new column to not drop the leading zero. thank you so much
 
Upvote 0
Glad you sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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