PocketLoan
PocketLoan

Reputation: 532

Altering Excel Font Rendering to Fit Content in Various Zoom Levels

You can easily fit the content of your cells by selecting a series of columns and double clicking with your cursor between two cells. However, if you zoom in or out the rendering of the cells changes and what had been autofit changes relative to the size of the cell and you end up with a #####.

Is there a way to autofit cells that will hold irrespective of the level of zoom?

This is probably more question for the software development team at Excel but perhaps a VBA band-aid fix could be implemented in the interim, if the problem is ever addressed.

Thanks!

Upvotes: 1

Views: 1670

Answers (2)

K_B
K_B

Reputation: 3678

Unfortunately the zoom level (by scrolling with the mousewheel) by default cannot be captured to trigger a VBA script.

The only solution seems to be to have a VBA subroutine running in the background constantly that stores the current zoomlevels and the sheet they apply to in a Public variable.

When that variable is different from the one currently observed from the application you need to activate Autofit for all the worksheet columns again.

Alternatively you could just store a single number (THE zoomlevel), then when you switch between sheets that have different zoomlevels the subroutine will immediately Autofit for the sheet you switch to.

Ofcourse you have to consider the intervals at which this is done.

Last alternative is to Autfit manually whenever you spot such occurence...

Upvotes: 1

Christian Sauer
Christian Sauer

Reputation: 10939

There is a menu button who does that automatically. For me it is in the Ribbon "Start", than "Rows" , than "Format" than one of the Columnwidth options. Excuse the vague description, I am using a german version of Iffce.

Upvotes: 1

Related Questions