ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Is it possible to replace a series of characters by a page break? (https://www.excelbanter.com/excel-discussion-misc-queries/144000-possible-replace-series-characters-page-break.html)

Sue Clay

Is it possible to replace a series of characters by a page break?
 
I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?

Sue Clay[_2_]

Is it possible to replace a series of characters by a page break?
 
Ok - make that "I'm importing data ... "

"Sue Clay" wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?


PCLIVE

Is it possible to replace a series of characters by a page break?
 
Use Replace from the Edit menu.
For Replace with, hold Alt and type 010.

HTH,
Paul

"Sue Clay" wrote in message
...
Ok - make that "I'm importing data ... "

"Sue Clay" wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a
page
break. Is this possible?




Gary''s Student

Is it possible to replace a series of characters by a page break?
 
You can use Find/Replace

FInd:
$$$$

Replace with:
CNTRL-j
--
Gary''s Student - gsnu200724


"Sue Clay" wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?


Sue Clay[_2_]

Is it possible to replace a series of characters by a page bre
 
Thanks for the response. Tried it, but instead of replacing with page break
- it gave me a larger cell size. Odd. On this machine, I'm using version
2000. Would that be my problem?

"PCLIVE" wrote:

Use Replace from the Edit menu.
For Replace with, hold Alt and type 010.

HTH,
Paul

"Sue Clay" wrote in message
...
Ok - make that "I'm importing data ... "

"Sue Clay" wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a
page
break. Is this possible?





Sue Clay[_2_]

Is it possible to replace a series of characters by a page bre
 
Thanks for the response. Unfortunately, it replaces my cell with a larger
one - but no page break. Any other ideas?

"Gary''s Student" wrote:

You can use Find/Replace

FInd:
$$$$

Replace with:
CNTRL-j
--
Gary''s Student - gsnu200724


"Sue Clay" wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?


PCLIVE

Is it possible to replace a series of characters by a page bre
 
What exactly do you mean by "Page Break"? Give me an example of what the
cell looks like before, and what it should look like after.


"Sue Clay" wrote in message
...
Thanks for the response. Tried it, but instead of replacing with page
break
- it gave me a larger cell size. Odd. On this machine, I'm using version
2000. Would that be my problem?

"PCLIVE" wrote:

Use Replace from the Edit menu.
For Replace with, hold Alt and type 010.

HTH,
Paul

"Sue Clay" wrote in message
...
Ok - make that "I'm importing data ... "

"Sue Clay" wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a
page
break. Is this possible?







Sue Clay[_2_]

Is it possible to replace a series of characters by a page bre
 
My goal is to be able to open a text file in Excel, find a character series
($$$$) and replace it with a manual page break so that when I actually print
it - it will start a new sheet where the "$$$$" was. The $$$$ will always
appear on its own line in the first column.

"PCLIVE" wrote:

What exactly do you mean by "Page Break"? Give me an example of what the
cell looks like before, and what it should look like after.


"Sue Clay" wrote in message
...
Thanks for the response. Tried it, but instead of replacing with page
break
- it gave me a larger cell size. Odd. On this machine, I'm using version
2000. Would that be my problem?

"PCLIVE" wrote:

Use Replace from the Edit menu.
For Replace with, hold Alt and type 010.

HTH,
Paul

"Sue Clay" wrote in message
...
Ok - make that "I'm importing data ... "

"Sue Clay" wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a
page
break. Is this possible?







Gord Dibben

Is it possible to replace a series of characters by a page break?
 
You have been given a couple of suggestions which give you a carriage return
within a cell................alt + 0010 or CTRL + j

Is this what you want or do you want an actual "pagebreak" as in
InsertPageBreak.

If the latter, I would suggest you need code.


Gord Dibben MS Excel MVP

On Thu, 24 May 2007 11:36:01 -0700, Sue Clay <Sue
wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?



Sue Clay[_2_]

Is it possible to replace a series of characters by a page bre
 
Yes, I'm looking for an actual pagebreak. That answers my question. Thanks.



"Gord Dibben" wrote:

You have been given a couple of suggestions which give you a carriage return
within a cell................alt + 0010 or CTRL + j

Is this what you want or do you want an actual "pagebreak" as in
InsertPageBreak.

If the latter, I would suggest you need code.


Gord Dibben MS Excel MVP

On Thu, 24 May 2007 11:36:01 -0700, Sue Clay <Sue
wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?




Toppers

Is it possible to replace a series of characters by a page bre
 
try:

Select column with "$$$$" and run this macro:

Sub SetPageBreak()

With ActiveSheet
For Each cell In Selection
If cell = "$$$$" Then
cell.Select
.HPageBreaks.Add Befo=ActiveCell
End If
Next cell
End With
End Sub


"Sue Clay" wrote:

Yes, I'm looking for an actual pagebreak. That answers my question. Thanks.



"Gord Dibben" wrote:

You have been given a couple of suggestions which give you a carriage return
within a cell................alt + 0010 or CTRL + j

Is this what you want or do you want an actual "pagebreak" as in
InsertPageBreak.

If the latter, I would suggest you need code.


Gord Dibben MS Excel MVP

On Thu, 24 May 2007 11:36:01 -0700, Sue Clay <Sue
wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?




Gord Dibben

Is it possible to replace a series of characters by a page bre
 
Which Toppers has provided in his post.

What will you do with the cells that conatin $$$$?

Do you want to clear them or leave as is?

To clear, revise Toppers code to this.

Sub SetPageBreak()

With ActiveSheet
For Each cell In Selection
If cell = "$$$$" Then
cell.Select
.HPageBreaks.Add Befo=ActiveCell
cell.EntireRow.ClearContents
'or cell.ClearContents
End If
Next cell
End With
End Sub


Gord

On Thu, 24 May 2007 12:28:01 -0700, Sue Clay
wrote:

Yes, I'm looking for an actual pagebreak. That answers my question. Thanks.



"Gord Dibben" wrote:

You have been given a couple of suggestions which give you a carriage return
within a cell................alt + 0010 or CTRL + j

Is this what you want or do you want an actual "pagebreak" as in
InsertPageBreak.

If the latter, I would suggest you need code.


Gord Dibben MS Excel MVP

On Thu, 24 May 2007 11:36:01 -0700, Sue Clay <Sue
wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?





Sue Clay[_2_]

Is it possible to replace a series of characters by a page bre
 
That does the trick. Great.

Thanks so much!

"Toppers" wrote:

try:

Select column with "$$$$" and run this macro:

Sub SetPageBreak()

With ActiveSheet
For Each cell In Selection
If cell = "$$$$" Then
cell.Select
.HPageBreaks.Add Befo=ActiveCell
End If
Next cell
End With
End Sub


"Sue Clay" wrote:

Yes, I'm looking for an actual pagebreak. That answers my question. Thanks.



"Gord Dibben" wrote:

You have been given a couple of suggestions which give you a carriage return
within a cell................alt + 0010 or CTRL + j

Is this what you want or do you want an actual "pagebreak" as in
InsertPageBreak.

If the latter, I would suggest you need code.


Gord Dibben MS Excel MVP

On Thu, 24 May 2007 11:36:01 -0700, Sue Clay <Sue
wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?



Sue Clay[_2_]

Is it possible to replace a series of characters by a page bre
 
Thanks for all your help. That'll do it!

"Gord Dibben" wrote:

Which Toppers has provided in his post.

What will you do with the cells that conatin $$$$?

Do you want to clear them or leave as is?

To clear, revise Toppers code to this.

Sub SetPageBreak()

With ActiveSheet
For Each cell In Selection
If cell = "$$$$" Then
cell.Select
.HPageBreaks.Add Befo=ActiveCell
cell.EntireRow.ClearContents
'or cell.ClearContents
End If
Next cell
End With
End Sub


Gord

On Thu, 24 May 2007 12:28:01 -0700, Sue Clay
wrote:

Yes, I'm looking for an actual pagebreak. That answers my question. Thanks.



"Gord Dibben" wrote:

You have been given a couple of suggestions which give you a carriage return
within a cell................alt + 0010 or CTRL + j

Is this what you want or do you want an actual "pagebreak" as in
InsertPageBreak.

If the latter, I would suggest you need code.


Gord Dibben MS Excel MVP

On Thu, 24 May 2007 11:36:01 -0700, Sue Clay <Sue
wrote:

I'm important data from a text file and would like to be able to
automatically replace a pre-set series of characters (say, $$$$) by a page
break. Is this possible?






All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com