ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How set print area & account for cell text length? (https://www.excelbanter.com/excel-programming/408588-how-set-print-area-account-cell-text-length.html)

Chet

How set print area & account for cell text length?
 
Problem statement-
I am trying to determine how to set the print area for my worksheet? I
also need to determine if it should be formatted as landscape or
portrait? My problem is that some of my cells in the right-most
column have text which is wider than the actual column width is. ( See
my example below.)

Example--
cell A1=5 columnwidth =10
cell B1=1234 columnwidth = 10
cell C1= "the_fox_jumped_over" columnwidth =10
cell C2="text_here_and_it's_very_long_and_goes_on_and_o n" columnwidth
= 10.

As you see I have a combined total columnwidth of 30 so if I set print
area to A1:C1 it would likely cut off the contents of cell C2 from
being displayed on the output due to the length of the contents of C1.
(I don't want to change the columnwidths (or rowheights) but I would
want to adjust the setprintarea such that I can display all of the
cells contents of the right column.)

Question summary-
1.How do I properly set the print area to account for the width the
contents of each cell so it's not truncated after setting the print
area? (Knowing the right-most column will have cells with longer text
length than columnwidth.)

2. How to set up the page to print landscape or portrait based on the
column widths and the length of text within the right most cells?
(Since if the text in the right most column is long enough maybe the
worksheet should be landscape orientation.)

Thanks,

Chet

Jim Rech[_2_]

How set print area & account for cell text length?
 
Capture the width of C and then do an auto fit of it. Now you know the
total width needed to print C. Reset C and go through D, E, etc. adding the
width of each until you get the total width you need.

Re landscape I'd guess you'll need to make an arbitrary decision based on
the width of the print area.


--
Jim
"Chet" wrote in message
...
| Problem statement-
| I am trying to determine how to set the print area for my worksheet? I
| also need to determine if it should be formatted as landscape or
| portrait? My problem is that some of my cells in the right-most
| column have text which is wider than the actual column width is. ( See
| my example below.)
|
| Example--
| cell A1=5 columnwidth =10
| cell B1=1234 columnwidth = 10
| cell C1= "the_fox_jumped_over" columnwidth =10
| cell C2="text_here_and_it's_very_long_and_goes_on_and_o n" columnwidth
| = 10.
|
| As you see I have a combined total columnwidth of 30 so if I set print
| area to A1:C1 it would likely cut off the contents of cell C2 from
| being displayed on the output due to the length of the contents of C1.
| (I don't want to change the columnwidths (or rowheights) but I would
| want to adjust the setprintarea such that I can display all of the
| cells contents of the right column.)
|
| Question summary-
| 1.How do I properly set the print area to account for the width the
| contents of each cell so it's not truncated after setting the print
| area? (Knowing the right-most column will have cells with longer text
| length than columnwidth.)
|
| 2. How to set up the page to print landscape or portrait based on the
| column widths and the length of text within the right most cells?
| (Since if the text in the right most column is long enough maybe the
| worksheet should be landscape orientation.)
|
| Thanks,
|
| Chet



Chet

How set print area & account for cell text length?
 
On Mar 31, 12:48*pm, "Jim Rech" wrote:
Capture the width of C and then do an auto fit of it. *Now you know the
total width needed to print C. *Reset C and go through D, E, etc. adding the
width of each until you get the total width you need.

Re landscape I'd guess you'll need to make an arbitrary decision based on
the width of the print area.

--
Jim"Chet" wrote in message

...
| Problem statement-
| I am trying to determine how to set the print area for my worksheet? I
| also need to determine if it should be formatted as landscape or
| portrait? *My problem is that some of my cells in the right-most
| column have text which is wider than the actual column width is. ( See
| my example below.)
|
| Example--
| cell A1=5 columnwidth =10
| cell B1=1234 columnwidth = 10
| cell C1= "the_fox_jumped_over" columnwidth =10
| cell C2="text_here_and_it's_very_long_and_goes_on_and_o n" columnwidth
| = 10.
|
| As you see I have a combined total columnwidth of 30 so if I set print
| area to A1:C1 it would likely cut off the contents of cell C2 from
| being displayed on the output due to the length of the contents of C1.
| (I don't want to change the columnwidths (or rowheights) but I would
| want to adjust the setprintarea such that I can display all of the
| cells contents of the right column.)
|
| Question summary-
| 1.How do I properly set the print area to account for the width the
| contents of each cell so it's not truncated after setting the print
| area? (Knowing the right-most column will have cells with longer text
| length than columnwidth.)
|
| 2. How to set up the page to print landscape or portrait based on the
| column widths and the length of text within the right most cells?
| (Since if the text in the right most column is long enough maybe the
| worksheet should be landscape orientation.)
|
| Thanks,
|
| Chet


Thanks Jim.. I think that would work... a good idea on how to do
it... Thanks again.. Chet


All times are GMT +1. The time now is 02:57 PM.

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