Solved

Graphs no longer print to fit in Excel 2010

Posted on 2011-02-17
19
873 Views
Last Modified: 2012-05-11
My company recently upgraded me to excel 2010.  I produce many graphs and in the older versions of Excel, I could select any graph and print it.  It would automatically scale vertically and horizontally to fill the page.  With 2010, this no longer works.  It only scales in one direction (maintains ratio), forcing me to re-scale and modify all graphs before I can print.  This interferes with the layouts I had for printing them as part of my workbook.  This is a lot of rework for nothing.  Is there a setting I am missing or some fix to this that can get my old functionality back?
0
Comment
Question by:mickeymo09
  • 12
  • 6
19 Comments
 
LVL 41

Expert Comment

by:dlmille
ID: 34920924
Is your chart embedded in the worksheet, or on a tab by itself?  or both?

Dave
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34920970
Can you upload an example without confidential data?

Thanks,

Dave
0
 

Author Comment

by:mickeymo09
ID: 34921161
it is within the worksheet not a separate tab -
TEST-for-Printing.xlsx
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 41

Expert Comment

by:dlmille
ID: 34921333
How are you initiating the print?  By selecting the chart and then invoking print (for selected chart)?
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34921471
See this link:  http://www.mrexcel.com/forum/showthread.php?t=43358

This walks through how to do it, but apparently it may not be a "feature" anymore.

I'll keep looking...  I used to use this approach as well -

See this:  http://excel.tips.net/Pages/T002849_Preparing_a_Chart_Sheet_for_Printing.html  apparently this feature may no longer be available as it says "prior to Excel 2007"

Sorry - I don't think this is possible.  But, if I find something I'll let you know.

Dave
0
 
LVL 41

Accepted Solution

by:
dlmille earned 500 total points
ID: 34921499
0
 

Author Comment

by:mickeymo09
ID: 34922141
so the user will have to manually adjust the size of the graph to fit the page?
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34922272
It seems so.  Though it might be possible to create a macro to hit all graphs and adjust aspect ratio to match the current paper size (if user doesn't save after - because they may not look good on worksheet after that)...

Dave
0
 

Author Comment

by:mickeymo09
ID: 34922335
thank you so much for your help...
0
 
LVL 18

Expert Comment

by:Richard Daneke
ID: 34922351
Yes, that was convenient.

However, if you move the chart to its own worksheet  (last ribbon option on Design in Chart Tools group) Excel does scale the graph to fit the page.

Does each graph need to print on one page or do you resize several to fit on one page?
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34922459
@mickeymo - Not so fast...  

Here's the macro I suggested could be done.  It moves all embedded macros to their own chart tab.  I could have stopped short of automatic print, as the user could select the charts together and print them (but I added it anyway).

Run the macro:  
Sub MoveToChartPrintAndReturn()
Dim myChart As Shape, mySheet As Worksheet

    For Each mySheet In ActiveWorkbook.Worksheets
        mySheet.Activate
        For Each myChart In ActiveSheet.Shapes
            On Error GoTo skipShape
                ActiveSheet.ChartObjects(myChart.Name).Activate
            On Error Resume Next
            ActiveChart.Location Where:=xlLocationAsNewSheet
            ActiveChart.PrintOut 'comment this line out if you want user to print, manually
skipShape:
        Next myChart
    Next mySheet
End Sub

Open in new window

It will move them all to a separate CHART tab (recall, this is what I asked, if the charts were embedded or not, DoDahD)

At any rate, this will go through the entire workbook and move charts to the chart tab.

Dave
MoveChartsAndPrint-r1.xlsm
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34922466
It turns out this is better than working the aspect ratio.  I started on that and then recalled there's no reason they can't be in their own tab (as long as the user doesn't save the file, after!!!)

Dave
0
 

Author Comment

by:mickeymo09
ID: 34922492
print on one pge
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34922499
Test it out.  The code should work for you.

Dave
0
 

Author Comment

by:mickeymo09
ID: 34922500
thanks dlmille i will run this macro and it should print the graph to fit the page correct?
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34922502
Well, if they're embedded and you have selected a range behind several charts to print, then you're stuck back with the same can't do with Excel.  As, that can't be moved to a separate chart tab.

Dave
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34922506
That is correct.  you can still setup margins and stuff with the macro, but first test and see if it works with the demo I gave you.

Dave
0
 
LVL 41

Expert Comment

by:dlmille
ID: 34922507
let me know how it plays out.

Cheers,

dave
0
 

Author Comment

by:mickeymo09
ID: 34922523
i will do first thing in the morning. thanks again
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question