ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Printing using criteria (https://www.excelbanter.com/excel-worksheet-functions/142865-printing-using-criteria.html)

Gavin

Printing using criteria
 
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?




AKphidelt

Printing using criteria
 
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.

"Gavin" wrote:

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?





All times are GMT +1. The time now is 10:33 PM.

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