Thanks Jim:
That solve the problem very well.
Is there any work around to solve that If I 'CountA' returns greater than 10
then Page Orientation changes to Landscape?
Regards,
"Jim Rech" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> If you set no print area then the entire sheet is always printed. That
may
> be a simple answer if that's the result you want.
>
> If however you have some ranges you do not want to print you can create a
> dynamic Print_Area formula. Here's an example.
>
> Open the Define Name dialog and create or modify the name Print_Area to
have
> this definition:
>
> =OFFSET(Sheet1!$A$1,0,0,10,COUNTA(Sheet1!$A$1:$J$1))
>
> This will set a print area starting at A1 with 10 rows and as many columns
> as are used from A1 to J1 (assuming no empty columns). So if you have
> entries in A1 and B1 only, the print area is A1:B10. If you have entries
in
> A1 through G1 then the print area is A1:G10, etc.
>
> --
> Jim Rech
> Excel MVP
> "Murtaza" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> | How Can I conditionally change Print-Area...something like Conditional
> | Formula?
> |
> | Background:
> | I have designed a template for a class-room to update the student's
> profile.
> | I will distribute this template to every Class-Teacher S/he will the
> | distribute among students. Initially, I have setup 8 columns.
> |
> | Problem I faced while printing is that suppose some class have 5
students
> | some have 8 students or some have 12. How can i automatically setup
> | print-area (include or exclude the unnecessary columns in print-area)
> |
> | Hope I will get some solution for this.
> |
> | Regards,
> | Murtaza
> |
> |
> |
>
>
|