Is cell outside printable area?

C

Charlotte E

It there a way to check if a cell is outside the printable area?

Say, if the user set the printable area to columns A to G, and the macro
find a value in a cell in column H.

I would then like to mark that cell with a different background color - but
only cells outside the printable area, which has contents.


TIA,
 
G

GS

Charlotte E pretended :
It there a way to check if a cell is outside the printable area?

Say, if the user set the printable area to columns A to G, and the macro find
a value in a cell in column H.

I would then like to mark that cell with a different background color - but
only cells outside the printable area, which has contents.


TIA,

Try looking at the Intersect() function:

<air code>
If Not Intersect(cell, Range("Print_Area") Then 'shade it
 
C

CellShocked

It there a way to check if a cell is outside the printable area?

Say, if the user set the printable area to columns A to G, and the macro
find a value in a cell in column H.

I would then like to mark that cell with a different background color - but
only cells outside the printable area, which has contents.


TIA,
Go up in the upper left portion (the left edge) of the formula bar
where the cell name or named range appears, and type in "Print_Area".
When you enter a named range in that box, the screen jumps to that range.
The current print area is always named that, so... type it in.
 
C

CellShocked

Charlotte E pretended :

Try looking at the Intersect() function:

<air code>
If Not Intersect(cell, Range("Print_Area") Then 'shade it



Cool. I see lots of possibilities with that function.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top