View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default String width not exceed column width

However, I just did a test and 69 characters used 33 columns. As Gary's
Student said, a really difficult answer.

Mike F
"Mike Fogleman" wrote in message
m...
LEN(string) will give the number of characters in the string (includes
spaces). Since each column is one character wide, then this formula would
be real close to the actual number of columns used. Keep in mind not all
characters are the same width.

Mike F
"Norm Lundquist" wrote in
message ...
Given the font and size (Arial, 10), is it possible to calculate how wide
a
given string will be? I have 120 columns that are 1 character wide (12
pixels). I would like to know how many columns a given string will
cover.

Thank You!