A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Replacing carriage returns with a comma



 
 
Thread Tools Display Modes
  #1  
Old April 30th, 2009, 11:10 PM posted to microsoft.public.excel.misc
Sue Compelling
external usenet poster
 
Posts: 131
Default Replacing carriage returns with a comma

Hi

I have an address cell which has data with multiple lines - eg:

School of Science
Medical University

and I want to do a Find all: carriage returns and replace with a comma -
though I don't know the code to use for the carriage returns ...

Help

TIA

--
Sue Compelling
  #2  
Old April 30th, 2009, 11:28 PM posted to microsoft.public.excel.misc
Bob Phillips[_2_]
external usenet poster
 
Posts: 1,562
Default Replacing carriage returns with a comma

With Activecell

.Value = Replace(.Value, Chr(10),",")
End With

--
__________________________________
HTH

Bob

"Sue Compelling" wrote in message
...
Hi

I have an address cell which has data with multiple lines - eg:

School of Science
Medical University

and I want to do a Find all: carriage returns and replace with a comma -
though I don't know the code to use for the carriage returns ...

Help

TIA

--
Sue Compelling



  #3  
Old April 30th, 2009, 11:32 PM posted to microsoft.public.excel.misc
FSt1
external usenet poster
 
Posts: 2,788
Default Replacing carriage returns with a comma

hi
see this site...
http://en.allexperts.com/q/Excel-105...-returns-1.htm

regards
FSt1

"Sue Compelling" wrote:

Hi

I have an address cell which has data with multiple lines - eg:

School of Science
Medical University

and I want to do a Find all: carriage returns and replace with a comma -
though I don't know the code to use for the carriage returns ...

Help

TIA

--
Sue Compelling

  #4  
Old April 30th, 2009, 11:37 PM posted to microsoft.public.excel.misc
Sue Compelling
external usenet poster
 
Posts: 131
Default Replacing carriage returns with a comma

Thanks FSt1 for the quick response - I also kept searching and discovered the
very simple

Find CTL J
Replace ,
Replace ALL

Brilliant


--
Sue Compelling


"FSt1" wrote:

hi
see this site...
http://en.allexperts.com/q/Excel-105...-returns-1.htm

regards
FSt1

"Sue Compelling" wrote:

Hi

I have an address cell which has data with multiple lines - eg:

School of Science
Medical University

and I want to do a Find all: carriage returns and replace with a comma -
though I don't know the code to use for the carriage returns ...

Help

TIA

--
Sue Compelling

  #5  
Old April 30th, 2009, 11:42 PM posted to microsoft.public.excel.misc
smartin
external usenet poster
 
Posts: 780
Default Replacing carriage returns with a comma

Sue Compelling wrote:
Hi

I have an address cell which has data with multiple lines - eg:

School of Science
Medical University

and I want to do a Find all: carriage returns and replace with a comma -
though I don't know the code to use for the carriage returns ...


This might work for you

=SUBSTITUTE(A1,CHAR(10),",")

  #6  
Old April 22nd, 2010, 09:00 AM posted to microsoft.public.excel.misc
David
external usenet poster
 
Posts: 1,494
Default Replacing carriage returns with a comma

thanks sue the ctrl J worked for me. the Alt 013 didnt - saved me a couple of
couple of delete down arrow, delete down arrow, delete down arrow.

"Sue Compelling" wrote:

Thanks FSt1 for the quick response - I also kept searching and discovered the
very simple

Find CTL J
Replace ,
Replace ALL

Brilliant


--
Sue Compelling


"FSt1" wrote:

hi
see this site...
http://en.allexperts.com/q/Excel-105...-returns-1.htm

regards
FSt1

"Sue Compelling" wrote:

Hi

I have an address cell which has data with multiple lines - eg:

School of Science
Medical University

and I want to do a Find all: carriage returns and replace with a comma -
though I don't know the code to use for the carriage returns ...

Help

TIA

--
Sue Compelling

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:46 AM.


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