Printing using criteria

G

Gavin

I am desperate to find out wether it is possible to set up a work book that
you are able to set the print range area linked to the IF formula.

EG.

If there is a value in Cell A1 then I want the print range to be A1:B1 other
wise no print range. Similarly if there is a value in Cell A2 then I want the
print range to be A2:B2 and so on?
 
A

AKphidelt

You'd have to use VBA for that... something like

If Range("A3").Value <> 0 Then
ActiveSheet.HPageBreaks(1).Location = Worksheets(1).Range("A1")
ActiveSheet.VPageBreaks(1).Location = Worksheets(1).Range("B1")

And you'd probably have to create some kind of loop to check if A4 has data,
and so on.
 
Top