Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Within an Excel 97 sheet, I want to find all occurrences of a certain string
text. From each of these cells, I need to go down one row and left one cell, and insert a page break. I am having trouble with the syntax to accomplish this, particularly with what is needed to position me at the desired point for the page insert. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim rng as Range
set rng = cells.Find("StringTarget") if not rng is nothing then sAddr = rng.Address do Activesheet.HPageBreaks.Add rng.offset(1,-1) set rng = cells.findnext(rng) loop while rng.Address < sAddr Adjust to suit -- Regards, Tom Ogilvy "djh" wrote in message ... Within an Excel 97 sheet, I want to find all occurrences of a certain string text. From each of these cells, I need to go down one row and left one cell, and insert a page break. I am having trouble with the syntax to accomplish this, particularly with what is needed to position me at the desired point for the page insert. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Thank you very much. That was just what I needed to get me started on my macros. Debbie "Tom Ogilvy" wrote: Dim rng as Range set rng = cells.Find("StringTarget") if not rng is nothing then sAddr = rng.Address do Activesheet.HPageBreaks.Add rng.offset(1,-1) set rng = cells.findnext(rng) loop while rng.Address < sAddr Adjust to suit -- Regards, Tom Ogilvy "djh" wrote in message ... Within an Excel 97 sheet, I want to find all occurrences of a certain string text. From each of these cells, I need to go down one row and left one cell, and insert a page break. I am having trouble with the syntax to accomplish this, particularly with what is needed to position me at the desired point for the page insert. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert more than 1 Row Syntax | Excel Worksheet Functions | |||
MS Office Excel97: Removing Page Breaks | Excel Discussion (Misc queries) | |||
excel97 vs excel2000 (Find instruction) | New Users to Excel | |||
excel97 vs excel2000 (Find instruction) | Excel Worksheet Functions | |||
OFFSET Syntax | Excel Programming |