Solved

Excel change font size automatically if too many characters

Posted on 2016-08-29
5
58 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 29

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 29

Expert Comment

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

Expert Comment

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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
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.

785 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