Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default vlookup with zip codes - not working - frustrated

Hi... I've wasted a full day today trying to do vlookup with zipcodes. Some
zipcodes start with zeros. I want to import county from one worksheet with
zip codes into another worksheet with zipcodes containing other data. But I
can't trim and clean my data like I do with account numbers because I lose
the leading zeros on some zip codes. And for some strange reason I can't get
the zipcodes on both worksheets into the same format. If I make them both
zip code format it won't work. If I make them both text, some but not all of
the leading zeros are lost. I can't get them into identical format for
vlookup. I'm at a loss here with this usually simple vlookup task that has
been a bear today. PLEASE advise.
--
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default vlookup with zip codes - not working - frustrated

I tested VLOOKUP for a cell and range table formatted as zipcode and text,
one of which would be required to properly display the leading zero. Both
lookup without error as long as they are both formatted the same, either
zipcode or text.

You said, "for some strange reason I can't get the zipcodes on both
worksheets into the same format", this may be due to the fact that just
because you format the cell doesn't mean what you see in the cell is
formatted accordingly. If text or a number format exists and you format it
zipcode, the date in the cell is not actually formatted to zipcode until you
activate the cell and press enter (this can be done programatically also).
If a cell contains a zipcode fomat and it is formatted text or number
format, the data will not be text or a number until you activate the cell
and press enter (this can be done programatically also). I would venture to
guess that this is the reason for you saying you can't get them fomatted the
same.

If this doesn't help, post your lookup fomula for varification.


Regards,

Alan




"chrissyb" wrote in message
...
Hi... I've wasted a full day today trying to do vlookup with zipcodes.
Some
zipcodes start with zeros. I want to import county from one worksheet
with
zip codes into another worksheet with zipcodes containing other data. But
I
can't trim and clean my data like I do with account numbers because I lose
the leading zeros on some zip codes. And for some strange reason I can't
get
the zipcodes on both worksheets into the same format. If I make them
both
zip code format it won't work. If I make them both text, some but not all
of
the leading zeros are lost. I can't get them into identical format for
vlookup. I'm at a loss here with this usually simple vlookup task that
has
been a bear today. PLEASE advise.
--
Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default vlookup with zip codes - not working - frustrated

Perhaps try padding leading zeros to the lookup values to match that within
the source table's 1st col (the lookup col), something like this in B1:
=VLOOKUP(TEXT(A1,"00000"),ZipTable1,2,0)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"chrissyb" wrote:
Hi... I've wasted a full day today trying to do vlookup with zipcodes. Some
zipcodes start with zeros. I want to import county from one worksheet with
zip codes into another worksheet with zipcodes containing other data. But I
can't trim and clean my data like I do with account numbers because I lose
the leading zeros on some zip codes. And for some strange reason I can't get
the zipcodes on both worksheets into the same format. If I make them both
zip code format it won't work. If I make them both text, some but not all of
the leading zeros are lost. I can't get them into identical format for
vlookup. I'm at a loss here with this usually simple vlookup task that has
been a bear today. PLEASE advise.
--
Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
Default vlookup with zip codes - not working - frustrated

Try selecting the column with the zip codes, then hit Data---Text to
Columns---Next---Next---Select "General"--- Then finish
This does the same thing as R1C1's comment about activating the cell
and pressing enter.

Cheers
Tony


On Apr 10, 9:06 am, chrissyb
wrote:
Hi... I've wasted a full day today trying to do vlookup with zipcodes. Some
zipcodes start with zeros. I want to import county from one worksheet with
zip codes into another worksheet with zipcodes containing other data. But I
can't trim and clean my data like I do with account numbers because I lose
the leading zeros on some zip codes. And for some strange reason I can't get
the zipcodes on both worksheets into the same format. If I make them both
zip code format it won't work. If I make them both text, some but not all of
the leading zeros are lost. I can't get them into identical format for
vlookup. I'm at a loss here with this usually simple vlookup task that has
been a bear today. PLEASE advise.
--
Thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF statements terribly frustrated! Mandy Excel Discussion (Misc queries) 11 October 23rd 06 12:32 AM
Vlookup using letter and numeric codes LW_Greeney Excel Discussion (Misc queries) 2 May 23rd 06 05:24 PM
Vlookup w/multiple codes Whnke Excel Worksheet Functions 2 March 12th 06 08:09 PM
Frustrated Cook Wazza McG Excel Worksheet Functions 11 November 21st 05 08:56 PM
Stuck and getting frustrated. Can you assist Andy S Excel Discussion (Misc queries) 2 January 30th 05 04:29 PM


All times are GMT +1. The time now is 07:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"