Forum Discussion

Ray Bonachea's avatar
Ray Bonachea
Copper Contributor
Oct 19, 2018

Width of a string

I am filling an Excel cell with several lines of text.  I want to have the text all start and end at the same place. (Similar to Justify in Word).  But counting characters does not work because characters have different widths.  Is there a way to either specify a font that has constant character width or a vba function that tells me the width in pixels of a string?

Resources