Link to home
Start Free TrialLog in
Avatar of draeside
draesideFlag for Afghanistan

asked on

Can I autofit worksheet contents to fit screen both horizontally and vertically?

I have a workbook containing a set of worksheets containing pivot tables of various sales stats.
I wish to output this workbook on a large lcd screen TV in the sales room so that the sales team can see their stats changing dynamically through the day. I need to find a way to optimize worksheet font size to the largest possible size (both horizontally and vertically) so as to ensure that the report contents are legible to everyone in the room. I have tried playing around with autozoom but have not managed to find an acceptable solution as yet. Can anyone help?
TV-Stats---DB1---DB3.xlsm
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Hi there,

Excel is excellent at fitting to page - autozoom on printing. Instead of trying to tackle the spreadsheet, I would just do a print preview, set orientation to portrait/landscape as required.  Oh, of course set to fit 1x1.
draeside,

Try using something like this:

With ActiveWindow
    .WindowState = xlNormal
    .Top = 1
    .Left = 1
    .Height = Application.UsableHeight
    .Width = Application.UsableWidth
End With

Patrick
Avatar of draeside

ASKER

Hi,
I had considered these options but what I want to do is make maximum use of the whole page each time so that the information is presented as clearly as possible to the whole office. With your solution (and other auto-zoom macros I have written) I can maximise horizontally but not vertically, which leaves unused space at the bottom of the page. The number of rows can change each time the pivot is refeshed so I need a solution that calulates the number of rows that need to be displayed and adjusts the row height and column width accordingly to fill up the entire screen.
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial