Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Replace return of line by a space in VBA

Hello,

I would like to have your assistance In VBA

I have my data which starts in D5 until D156. In each cell, I have an
address and in several addresses, I have a return to the line.

My question. It is possible to detect in a string a return to the line
in VBA and to replace it by a space.

I have also another problem. In the address, I have some times several
space between two words, is it possible to count the number of space
between two words in if there is more than one space, then to remove
the others not to have but one.

Thanks for your help

Keawee



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Replace return of line by a space in VBA

Keawee,

Try this

Replace(ActiveCell.Value, Chr$(10), " ")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"keawee" wrote in message
...
Hello,

I would like to have your assistance In VBA

I have my data which starts in D5 until D156. In each cell, I have an
address and in several addresses, I have a return to the line.

My question. It is possible to detect in a string a return to the line
in VBA and to replace it by a space.

I have also another problem. In the address, I have some times several
space between two words, is it possible to count the number of space
between two words in if there is more than one space, then to remove
the others not to have but one.

Thanks for your help

Keawee



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



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 a space with carriage return in excel MikeMcCollum Excel Discussion (Misc queries) 4 April 3rd 23 04:29 PM
Find and Replace - Replace with Blank Space Studebaker Excel Discussion (Misc queries) 4 April 3rd 23 10:55 AM
enter does 1 line space- scanner does 2 line space need 1 line lockboat New Users to Excel 0 September 6th 08 02:20 PM
Replace a ; with a , and a space Jo Excel Worksheet Functions 1 April 22nd 05 02:19 PM
Find/Replace carriage return & line feed characters in Excel. Mary Cullen Excel Worksheet Functions 1 January 4th 05 07:39 PM


All times are GMT +1. The time now is 09:45 PM.

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"