#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 103
Default Find and replace

Is it possible to replace with a caraige return?
I received a file with about 5000 words in one cell, separated by commas
every few words. Is there a way to use a "replace" to replace the commas
with a return so it breaks up onto about 1400 lines?

Or some other way to break it up into a usefull list?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Find and replace

You could try this:

Find - enter a comma,
..In "replace with", hold down the <Alt key,
And using the Num keypad, *not* the numbers under the function keys,
Enter
0010

Of course, you won't see anything in the replace box, but simply click
"Replace All".

The cell should automatically format to "Wrap Text",
But if it doesn't,
<Format <Cells <Alignment tab,
And click on "Wrap Text".

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"widman" wrote in message
...
Is it possible to replace with a caraige return?
I received a file with about 5000 words in one cell, separated by commas
every few words. Is there a way to use a "replace" to replace the commas
with a return so it breaks up onto about 1400 lines?

Or some other way to break it up into a usefull list?


  #3   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default Find and replace

you could use a macro. paste the code into a VBA module and change the
source and destination ranges to suit your needs. if you are not familiar
w/macros there is some helpful material here
http://www.mvps.org/dmcritchie/excel/excel.htm


Sub test()
Dim varTemp As Variant
Dim rngSource As Range
Dim rngDest As Range

Set rngSource = Sheets("Sheet1").Range("A1")
Set rngDest = Sheets("Sheet2").Range("A1")

varTemp = Split(rngSource.Value, ",", -1, vbTextCompare)

For i = LBound(varTemp) To UBound(varTemp)
varTemp(i) = Trim(varTemp(i))
Next i

rngDest.Resize(UBound(varTemp) + 1, 1).Value = _
Application.Transpose(varTemp)

End Sub


"widman" wrote:

Is it possible to replace with a caraige return?
I received a file with about 5000 words in one cell, separated by commas
every few words. Is there a way to use a "replace" to replace the commas
with a return so it breaks up onto about 1400 lines?

Or some other way to break it up into a usefull list?

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
How to cancel a find & replace command "midstream"? Matt from GVA Excel Worksheet Functions 4 September 4th 06 05:47 PM
Macro: Find and replace Bertie Excel Discussion (Misc queries) 1 May 29th 06 02:01 PM
Find and Replace blakrapter Excel Worksheet Functions 3 December 15th 05 12:25 AM
Find and replace of word causes change of font formatting jwa90010 New Users to Excel 4 July 22nd 05 08:10 PM
VB Find and Replace Bony_Pony Excel Worksheet Functions 10 December 6th 04 05:45 PM


All times are GMT +1. The time now is 06:22 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"