Solved

Excel change font size automatically if too many characters

Posted on 2016-08-29
5
52 Views
Last Modified: 2016-08-30
I have a cell that I want to change font size to be as large as possible to fill cell height.
But, I want the font size to change when I have more characters.
Example.... I want cell height and width to maintain, but there are too many characters.
So, we need to reduce font size.  (I am using column C for the data, and the putting in column A by =C3)
cell size cannot change, but I want to change font size automatically
Hope this makes sense.
Thanks
0
Comment
Question by:chris pike
  • 3
5 Comments
 
LVL 28

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 500 total points
ID: 41775091
Maybe this......

Sub SetFontSizeToAutofit()
With Range("A:A")
   .WrapText = False
   .ShrinkToFit = True
End With
End Sub

Open in new window

0
 

Author Closing Comment

by:chris pike
ID: 41776267
Works for me. Thanks
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
ID: 41776270
Good one Neeraj.
1
 
LVL 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41776275
You're welcome Chris! Glad to help.
0
 
LVL 28

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41776277
@ Professor
Thanks for the appreciation. :)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now