View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default how do I calculate number of characters that will fit in a cell

How about using a custom format:
General*-;-General*-;0*-;@*-

You can use your favorite numberformats in that string.

It's
Positive;negative;zero;text

the * tells excel to fill out the cell with the next character.




Larry wrote:

I have a spreadsheet that will be printed onto a preprinted form. I need to
calculate the value in a cell and then pad that cell with repeating hyphens
to fille out the remainder.

How can I determine how many hyphens I need to generate?


--

Dave Peterson