Thread
:
Search and Replace columns using Case?
View Single Post
#
4
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Search and Replace columns using Case?
It WAS tested and it did work. I used ucase in case some is not typed
EXACTLY.
Case "ARMY Transport Corps": C.Value = "RACT
try
Case "ARMY TRANSPORT CORPS": C.Value = "RACT
--
Don Guillett
SalesAid Software
"john_t_h " wrote in message
...
hmmm I gave this a go but it doesn't seem to work. Here is my code.
Code:
--------------------
Columns("H:H").Select
For Each C In Selection
Select Case UCase(C)
Case "ARMY Transport Corps": C.Value = "RACT"
Case "ARMY Chaplains Department": C.Value = "RAACHd"
Case "ARMY Catering Corps": C.Value = "AACC"
Case "ARMY Electrical&Mech Engineers": C.Value = "RAEME"
Case "ARMY Engineers": C.Value = "RAE"
Case "ARMY Medical Corps": C.Value = "RAAMC"
Case "ARMY Pay Corps": C.Value = "RAAPC"
Case "ARMY Ordnance Corps": C.Value = "RAAOC"
Case "AARMY Nursing Corps": C.Value = "RAANC"
Case "ARMY Signals Corps": C.Value = "RA SIGS"
End Select
Next C
--------------------
---
Message posted from
http://www.ExcelForum.com/
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]