Finding the length of proportional text strings
I need to combine two text cells in Excel into one character string with
filler dot characters in the middle to produce a character string of a fixed
length in inches that will end up in a Microsoft Word table. The fonts are
proportional and the same in both Excel and the Word table. For example
Left string - €śAAAAAA€ť
Right string - €śBBBBB€ť
Concatenated string with filler dots - €śAAAAAA€¦€¦BBBBB€ť
The only way I have found so far is to build the string putting one dot at
time in the middle until the string wraps in a cell whos width is set equal
to the Word table cell width. By testing the height of the cell I can tell
when the cell wraps and the length has been exceeded. Is there a better way
to accomplish this?
--
russ
|