[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.excel.programming

Find and Replace Macro

Josh O.

12/20/2006 1:44:00 AM

I am trying to make a Macro that searches addresses in a worksheet and
replaces "street" abbreviations with fully spelled out words. I have the
general idea of how to make the macro, but I have a couple of selective
replacements that I don't know how to handle

For example, I need to be able to replace "Dr" in "123 Monroe Dr", with
"Drive" to make "123 Monroe Drive". But I need to make sure that "Dr." in
"Dr. Bill Excel doesn't get replaced and make "Drive. Bill Excel".

The address column will be in different columns depending on which report is
being run. And there is no space or other character after "Dr" in the
address.

If I get this figured out, I should be able to solve my other problems. Any
ideas?
1 Answer

mikeq

12/20/2006 3:09:00 AM

0

Monroe Dr. has a space in front of the D
Dr. Bill Excel Dosen't (maybe)
Would a search for (space)Dr. Help?
--
Mike Q.


"Josh O." wrote:

> I am trying to make a Macro that searches addresses in a worksheet and
> replaces "street" abbreviations with fully spelled out words. I have the
> general idea of how to make the macro, but I have a couple of selective
> replacements that I don't know how to handle
>
> For example, I need to be able to replace "Dr" in "123 Monroe Dr", with
> "Drive" to make "123 Monroe Drive". But I need to make sure that "Dr." in
> "Dr. Bill Excel doesn't get replaced and make "Drive. Bill Excel".
>
> The address column will be in different columns depending on which report is
> being run. And there is no space or other character after "Dr" in the
> address.
>
> If I get this figured out, I should be able to solve my other problems. Any
> ideas?