Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Find closest match and copy

Hello,

In sheet 1 col. A I have many zip codes and In sheet 2 I have 5 col. A,B,C,D
are zip codes (They Do not match with sheet1 col. A) and in col. "E" I have
phone numbers.
How can I do a macro that compares sheet1 Col.A with sheet2 Col. A,B,C,D and
find the closest match and if found copy corresponding cell in Col. E which
is phone number to sheet1 next to zip code?

thank you.

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Find closest match and copy

How many rows of data do you have in Sheet2, more than 5000?

Are the zip codes standard U.S. 5 digit zip codes? Do any of the zip codes
start with leading 0s? If so, are the zip codes entered as TEXT strings or
are they entered as NUBERS with a custom number format to allow the leading
0s?


--
Biff
Microsoft Excel MVP


"saman110 via OfficeKB.com" <u35670@uwe wrote in message
news:777df6d099b35@uwe...
Hello,

In sheet 1 col. A I have many zip codes and In sheet 2 I have 5 col.
A,B,C,D
are zip codes (They Do not match with sheet1 col. A) and in col. "E" I
have
phone numbers.
How can I do a macro that compares sheet1 Col.A with sheet2 Col. A,B,C,D
and
find the closest match and if found copy corresponding cell in Col. E
which
is phone number to sheet1 next to zip code?

thank you.

--
Message posted via http://www.officekb.com



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Find closest match and copy

Hello Valko,

Sheet2 has more than half a million of rows. (Excel 2007)
Zip codes don't have leading 0s.
They are entered as Numbers. (I can change them if neccessary)

T. Valko wrote:
How many rows of data do you have in Sheet2, more than 5000?

Are the zip codes standard U.S. 5 digit zip codes? Do any of the zip codes
start with leading 0s? If so, are the zip codes entered as TEXT strings or
are they entered as NUBERS with a custom number format to allow the leading
0s?

Hello,

[quoted text clipped - 10 lines]

thank you.


--
Message posted via http://www.officekb.com

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Find closest match and copy

Sheet2 has more than half a million of rows. (Excel 2007)

Ok, with that many rows you need a programmed solution. It could be done
with formulas but would take forever to calculate. Maybe repost in the
Programming group.


--
Biff
Microsoft Excel MVP


"saman110 via OfficeKB.com" <u35670@uwe wrote in message
news:77802c06da41e@uwe...
Hello Valko,

Sheet2 has more than half a million of rows. (Excel 2007)
Zip codes don't have leading 0s.
They are entered as Numbers. (I can change them if neccessary)

T. Valko wrote:
How many rows of data do you have in Sheet2, more than 5000?

Are the zip codes standard U.S. 5 digit zip codes? Do any of the zip codes
start with leading 0s? If so, are the zip codes entered as TEXT strings or
are they entered as NUBERS with a custom number format to allow the
leading
0s?

Hello,

[quoted text clipped - 10 lines]

thank you.


--
Message posted via http://www.officekb.com



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
Help! Find Closest Coordinate Match Bill Excel Discussion (Misc queries) 6 May 2nd 23 07:42 PM
closest match [email protected] Excel Worksheet Functions 4 June 11th 06 02:30 PM
Find the closest match to a reference number in a row of unsorted Nick Krill Excel Worksheet Functions 3 January 1st 06 08:33 PM
find closest match to a reference number in a row of numbers Nick Krill Excel Discussion (Misc queries) 4 December 21st 05 11:59 AM
Closest number match help ... NP Excel Worksheet Functions 0 October 28th 04 09:33 AM


All times are GMT +1. The time now is 09:28 AM.

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

About Us

"It's about Microsoft Excel"