Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Removing semicolons

I have successfully cleaned my data up to the point
where ";" is are now at the beginning and end of the
field. Please I need a macros (Office XP)to clean up this
huge database.

For example:

;PM;LE; to become PM;LE

;QM to become QM

LE;QM; to become LE;QM






  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default Removing semicolons

Can you use something along the lines of:-

i = 1
Do
Target = Range("D" & i)
TargetLength = Len(Target)
CharLeft = Left(Target, 1)
CharRight = Right(Target, 1)

If CharLeft = ";" Then Target = Right(Target, Len(Target) - 1)
If CharRight = ";" Then Target = Left(Target, Len(Target) - 1)

Range("D" & i) = Target
i = i + 1
Loop

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Removing semicolons

Hi Ja,
If it is already in Excel do a Find/Replace, replace all. Pretty fast and
easy, no code.
Thanks

"JA" wrote:

I have successfully cleaned my data up to the point
where ";" is are now at the beginning and end of the
field. Please I need a macros (Office XP)to clean up this
huge database.

For example:

;PM;LE; to become PM;LE

;QM to become QM

LE;QM; to become LE;QM







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing text between hyphens and removing the hyphens sonofroy Excel Discussion (Misc queries) 8 January 20th 10 05:25 PM
Removing #N/A Anto111 Excel Discussion (Misc queries) 4 June 24th 08 09:44 PM
Removing #N/A nibble New Users to Excel 4 July 26th 07 06:22 PM
Removing patterns without removing gridlines pennyb9 Excel Discussion (Misc queries) 1 July 11th 07 02:43 AM
Removing the +4 from zip+4 Manu Excel Discussion (Misc queries) 4 December 21st 04 03:54 AM


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"