View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Extract two letters

On Thu, 9 Aug 2007 16:35:40 +0100, "Bob Phillips"
wrote:


"Ron Rosenfeld" wrote in message
.. .
On Thu, 9 Aug 2007 14:11:57 +0100, "Bob Phillips"
wrote:

=MID(A1,FIND(LOOKUP(9.99999999999999E+307,--MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"012345 6789")),ROW(INDIRECT("1:"&LEN(A1))))),A1)-3,2)


I thought of that approach, Bob, but around here we have towns with
numbers in
the name, and that approach won't work.


Really? How odd!


I just looked at a file of place names at the US Census web site (Had a crash
so I don't have the URL). In any event, there were over 230 names (out of
65-70,000) that included a number. Possibly only a few have zip codes.
--ron