Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 915
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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,560
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

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
Carriage returns - how to get rid of them (again) Andrewsan Excel Discussion (Misc queries) 8 March 28th 07 10:15 AM
Formula for Carriage Returns Excel Believer Excel Discussion (Misc queries) 4 December 21st 06 04:37 PM
Carriage returns in the formula bar? rubeus Excel Worksheet Functions 4 July 6th 06 06:05 PM
Replacing commas with carriage return Hardip Excel Worksheet Functions 4 September 1st 05 01:39 PM
Carriage returns tracyt620 Excel Discussion (Misc queries) 1 July 7th 05 02:52 PM


All times are GMT +1. The time now is 01:44 PM.

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"