Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to replace this character ...

Hi

Recently I received a huge list of customers (around 3000) from my accounts department. This excel document contains 2 columns, viz Customer & Address. I am supposed to export this data to another system

The problem is this address column contains actually 4 fields (Door No, Name, City & County). All these fields are concatenated with a square symbol (unable to copy & paste that symbol) and pasted into the Address column. I think this symbol is carriage return character. Now I want to split this particular column into 4 separate columns mentioned above
How can I do this? Can someone let me know please..

Thanks in advance

Harish Mohanbabu
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default How to replace this character ...

Hi Harish

Check out DataText to columns in the Menubar

Try this to replace the carriage return character

Sub testme()
With ActiveSheet
.Cells.Replace What:=Chr(13), Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
End With
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Harish Mohanbabu" wrote in message
...
Hi,

Recently I received a huge list of customers (around 3000) from my accounts department. This excel document contains 2

columns, viz Customer & Address. I am supposed to export this data to another system.

The problem is this address column contains actually 4 fields (Door No, Name, City & County). All these fields are

concatenated with a square symbol (unable to copy & paste that symbol) and pasted into the Address column. I think this symbol
is carriage return character. Now I want to split this particular column into 4 separate columns mentioned above.
How can I do this? Can someone let me know please...

Thanks in advance,

Harish Mohanbabu



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default How to replace this character ...


-----Original Message-----
Hi,

Recently I received a huge list of customers (around

3000) from my accounts department. This excel document
contains 2 columns, viz Customer & Address. I am supposed
to export this data to another system.

The problem is this address column contains actually 4

fields (Door No, Name, City & County). All these fields
are concatenated with a square symbol (unable to copy &
paste that symbol) and pasted into the Address column. I
think this symbol is carriage return character. Now I
want to split this particular column into 4 separate
columns mentioned above.
How can I do this? Can someone let me know please...

Thanks in advance,

Harish Mohanbabu
.


You can use the InStr Function and search enter the search
string as Chr(0)

Position = InStr(Cells(x, y), Chr(0))

Then use the Left Function to copy the Leftmost characters
into another Celll and the Right Function to extract the
remaining characters in the string into a string variable
and loop through the rest of the remaining string until
all of the squares are removed from that string. Then move
on to the next Cell with squares and do the same.
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
Find and Replace only the first character Terry Willard Excel Discussion (Misc queries) 3 March 31st 10 03:21 PM
Character search and replace jkollenbroich Excel Worksheet Functions 1 February 3rd 09 08:14 PM
Replace nonprinting character pecan Excel Worksheet Functions 2 September 11th 08 07:17 PM
replace new line character ciruliz Excel Discussion (Misc queries) 3 November 16th 06 03:06 PM
How do I replace a character with another? MosesX8 Excel Discussion (Misc queries) 6 June 11th 05 09:25 AM


All times are GMT +1. The time now is 01:41 AM.

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

About Us

"It's about Microsoft Excel"