Conditional page breaks on conditional cell formatting

schatham

New Member
Joined
May 28, 2003
Messages
42
I have the following formula in a cell that is hidden, which I use for conditional formatting of the printed worksheet.

=IF(ISNUMBER(SEARCH("Folder",A2)),ISNUMBER(SEARCH("Folder",A2)),IF(ISNUMBER(SEARCH("URI Link",A2)),ISNUMBER(SEARCH("URI",A2)),0))

The worksheet, for all practical purposes, is a logfile created from output of another utility.
Row 1 is my column headings - Link Info & Link Folder
Row 2 is where my data starts. The formula above puts TRUE in the column if the words Folder or URI appear in column A on the corresponding row, and this row is conditionally formatted to look different than the other rows.
Rows 3 & 4 have data specific to the current conditions (shortcut & path).
Row 5 shows what was attempted to change on the shortcut (and was unsuccessful).
Rows 6 & 7 show the current working folder & the proposed/attempted working folder change (which was unsuccessful).
Row 8 is the next set of error messages.

Wherever I have the contents of row 2, I will also have rows 3-7 also.

The conditional formatting is set to be:
Condition 1 = Formula Is
and the condition is =INDIRECT("F"&ROW())=TRUE

and I have it set to turn that row grey to give you a way to distinguish which data goes with which message that follows it.

All of the above functions fine, and does what it is intended to do.

The problem is, is that with 45-46 rows on the printed output (it will be printed in Landscape format), the page breaks do not always occur where you have a clean break between one set of errors and the next.

Because the results of this will be divided up among others to research & make corrections, I want to have 1 page to have the complete set of error messages for that item - I don't want to split the error messages over multiple pages. I want to get as many sets of error messages on a page that I can, but if it's going to split the group, I want the formatted row of that next set to be at the top of the next page.

I've seen some vba things that sorta do page breaks, but nothing that does a page break on a conditionally formatted cell.

Questions - Can this be done? If so, what are the best ways to approach it? VBA? Or is there some function I'm overlooking?

Also - I may be limited, as I am using Excel 2002 on this machine.

Any advice, thoughts or input appreciated.

SC
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top