Is there an anti-wildcard? Find/Replace Character (Only those followed by nothing)

laban

New Member
Joined
Sep 27, 2011
Messages
10
I have a large amount of street address in a spreadsheet that need to be standardized. I am looking to change all entrys like: "101 Mainstreet W" to "101 Mainstreet West". When I do a find replace comand for " W" with " West" it will also alter any other word begining with "W". Ex. ("Oak Way" becomes "Oak Westay").

Is there any kind of anti-wildcard key to specify that I only want "W"s were nothing follows. Unfortunately, whoever originally entered the data did not put a space after the W, which would have simplified this.

Thanks,

Laban
 
Brain cramp, sorry.

=A1 & IFERROR(INDEX({"ast","orth","outh","est"}, MATCH(RIGHT(A1, 2), {" E"," N"," S"," W"}, 0)), "")

Code:
      -----A------ -------B--------
  1   Meadow Ave   Meadow Ave      
  2   Meadow Ave N Meadow Ave North
  3   Meadow Ave E Meadow Ave East 
  4   Meadow Ave S Meadow Ave South
  5   Meadow Ave W Meadow Ave West
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
"Why isn't there an anti-wild card?"

Because it isn't needed.

The existing wildcards allow you to specify "string that ends with W" with the expression "*W"
 
Upvote 0
Exellent, that does the trick. Thanks SHG!

One final question: Is there a way to prevent the conversion when the letter follows another set of charachters? The issue is that some of the addresses have Unit E, APT E, STE E, and are converted to Unit East.
 
Upvote 0
Thanks everyone.

SHG, I used your formula and then was able to clean up my apt/unit problem with a few find replace commands. Find: "Unit East" Replace: "Unit E"...

Mike, "*W" didn't limit the search to strings ending in W. It pulls up entry's like "Way" and others. Is this a cell formating problem?
 
Upvote 0

Forum statistics

Threads
1,225,157
Messages
6,183,249
Members
453,152
Latest member
ChrisMd

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