Hi, I am trying to replace each occurence of these items:
{city_name}, {state_name}, {state_abbreviation}
with its corresponding city, state and state abbreviation in these columns (the first three):
city_name state_name state_abreviation
So, for example, column D, Row 2 would read: "Atlanta Widgets - See Widgets in Atlanta, Georgia"
All cities and states need to be in title case except the slug needs to be in lowercase.
The attached file is only a sample of the thousands of rows.
I hope this is clear. Thanks in advance.
The UDF here
http://www.duehren.com/CodeSamples.html
Attempts to do what you want.
Copy and paste it into a worksheet module
then use the formula
=propercase(A1)
cant you just say in d2
=PROPER(A2)&" Widgets - See Widgets in "&PROPER(A2)&","& PROPER(B2)
or am i missing something?
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
"Preps" and such should stay lower case
???????????? preps ,slug whats that?
"Unless otherwise stated all my comments are directed at OP"
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Really?
The Rain In Spain.
The Rain in Spain.
I never heard the term Slugs, may be a U.S. thing,LOL
or maybe loop
something like this for each row and column
.Replace What:="city_name", Replacement:=Range("a3"), LookAt:= _ xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False
regards pike
If the solution helped please donate here to the RSPCA
Sites worth visiting;
J&R Solutions - royUK
AJP Excel Information - Andy Pope
Spreadsheet Toolbox
VBA for smarties - snb
Thanks everyone. It looks like martindwilson's formula works best for my purposes.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks