Printing using criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 

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

Back
Top