Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Replace a word with hard return code

In one cell, there is a string of names seperated by ";", like "Base
Marketing & Advertising; Base Personal Technologies & Access; Base
Media Focus"

This cell is merged with several cells to make it a big cell
(irrelevant here).

I want to see in this cell look not like a string, but look like
seperate lines

Base Marketing & Advertising
Base Personal Technologies & Access
Base Media Focus

I thought that maybe I should format the cell as wrap text, and
replace ";" with hard recturn code CHAR(10), so that the string
becomes seperate lines. Is it possible? How do I do it? Is there
another way to get what I need?

Thanks In Advance.

H.Z.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Replace a word with hard return code

Record a macro when you
select the range to fix
Edit|replace
what: ;
with: ctrl-j (hit and hold the control key while you hit the j key)
replace all

(you may want semicolon followed by a space character???)

You should see something like:

Selection.Replace What:="; ", Replacement:="" & Chr(10) & "", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False


You could use this, too:
Selection.Replace What:="; ", Replacement:=vblf, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False


Curious wrote:

In one cell, there is a string of names seperated by ";", like "Base
Marketing & Advertising; Base Personal Technologies & Access; Base
Media Focus"

This cell is merged with several cells to make it a big cell
(irrelevant here).

I want to see in this cell look not like a string, but look like
seperate lines

Base Marketing & Advertising
Base Personal Technologies & Access
Base Media Focus

I thought that maybe I should format the cell as wrap text, and
replace ";" with hard recturn code CHAR(10), so that the string
becomes seperate lines. Is it possible? How do I do it? Is there
another way to get what I need?

Thanks In Advance.

H.Z.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Replace a word with hard return code

Why not simply put in a hard return, after typing Base Marketing&
Advertising. Press Option Enter to give you a hard return in the same cell.
The cell row height can be up to about 410, Enough to have severel rows of
info in the one cell.
Skinman


"Dave Peterson" wrote in message
...
Record a macro when you
select the range to fix
Edit|replace
what: ;
with: ctrl-j (hit and hold the control key while you hit the j key)
replace all

(you may want semicolon followed by a space character???)

You should see something like:

Selection.Replace What:="; ", Replacement:="" & Chr(10) & "",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False


You could use this, too:
Selection.Replace What:="; ", Replacement:=vblf, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False


Curious wrote:

In one cell, there is a string of names seperated by ";", like "Base
Marketing & Advertising; Base Personal Technologies & Access; Base
Media Focus"

This cell is merged with several cells to make it a big cell
(irrelevant here).

I want to see in this cell look not like a string, but look like
seperate lines

Base Marketing & Advertising
Base Personal Technologies & Access
Base Media Focus

I thought that maybe I should format the cell as wrap text, and
replace ";" with hard recturn code CHAR(10), so that the string
becomes seperate lines. Is it possible? How do I do it? Is there
another way to get what I need?

Thanks In Advance.

H.Z.


--

Dave Peterson


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Replace a word with hard return code

My bet is that the OP (not me!) already has that data in his worksheet. He/she
is not doing the data entry.

Skinman wrote:

Why not simply put in a hard return, after typing Base Marketing&
Advertising. Press Option Enter to give you a hard return in the same cell.
The cell row height can be up to about 410, Enough to have severel rows of
info in the one cell.
Skinman

"Dave Peterson" wrote in message
...
Record a macro when you
select the range to fix
Edit|replace
what: ;
with: ctrl-j (hit and hold the control key while you hit the j key)
replace all

(you may want semicolon followed by a space character???)

You should see something like:

Selection.Replace What:="; ", Replacement:="" & Chr(10) & "",
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False


You could use this, too:
Selection.Replace What:="; ", Replacement:=vblf, LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False


Curious wrote:

In one cell, there is a string of names seperated by ";", like "Base
Marketing & Advertising; Base Personal Technologies & Access; Base
Media Focus"

This cell is merged with several cells to make it a big cell
(irrelevant here).

I want to see in this cell look not like a string, but look like
seperate lines

Base Marketing & Advertising
Base Personal Technologies & Access
Base Media Focus

I thought that maybe I should format the cell as wrap text, and
replace ";" with hard recturn code CHAR(10), so that the string
becomes seperate lines. Is it possible? How do I do it? Is there
another way to get what I need?

Thanks In Advance.

H.Z.


--

Dave Peterson


--

Dave Peterson
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
Replace hard return with a delimiter? Erin. Excel Worksheet Functions 3 June 25th 09 10:10 PM
Seeking the character code for entering a Hard Return in a cell? JKing Excel Discussion (Misc queries) 2 June 4th 08 11:06 PM
Replace ; with hard return Stephanie Excel Discussion (Misc queries) 11 April 17th 07 10:11 PM
Replace double spaces with Hard return Ket Excel Worksheet Functions 3 June 27th 06 03:10 PM
how to replace a hard return? go1angel Excel Programming 1 July 22nd 05 07:51 PM


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