Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Excel change font size automatically if too many characters

Posted on 2016-08-29
5
Medium Priority
?
74 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 34

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 2000 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 27

Expert Comment

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

Expert Comment

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

Expert Comment

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

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

580 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