ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do I calculate number of characters that will fit in a cell (https://www.excelbanter.com/excel-programming/409438-how-do-i-calculate-number-characters-will-fit-cell.html)

Larry

how do I calculate number of characters that will fit in a cell
 
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

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


All times are GMT +1. The time now is 01:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com