ColinCoady
New Member
- Joined
- Mar 21, 2019
- Messages
- 35
I'm look for VBA code to change the font size in a cell based on the number of lines in another cell.
I use the following formula to find out the number of lines in the other cell:
=LEN(InfoEntry!$B$14)-LEN(SUBSTITUTE(InfoEntry!$B$14,CHAR(10),""))+1
If the result of this formula is "8" lines or less the the font size for cell TenantQuote!$A$15 needs to be 12, if 9-14 lines the font size 11 is needed and greater than 14 lines then font size 10 is needed
Can anyone help me with this?
-Colin
I use the following formula to find out the number of lines in the other cell:
=LEN(InfoEntry!$B$14)-LEN(SUBSTITUTE(InfoEntry!$B$14,CHAR(10),""))+1
If the result of this formula is "8" lines or less the the font size for cell TenantQuote!$A$15 needs to be 12, if 9-14 lines the font size 11 is needed and greater than 14 lines then font size 10 is needed
Can anyone help me with this?
-Colin