View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.misc
count count is offline
external usenet poster
 
Posts: 64
Default Repost: How to calc string's printable width?

Hi,
Task at hand is to achieve this effect to print a directory:
Short Company Name....................Meredith Rockefeller
Long Company Name Truncated If Nece.......Judy Short

What we have here is left/right justified concatenation of:
LEFT(CompanyName,x) & "...y.dots..." & Contact
So we seek a solution to figure out x and y. Maybe some library offers such
facility?
AutoFill certainly manages to work out the widths 1 by 1 but can this be
bettered?
TIA,
Paul
PS. Task gets urgent so forgive the crosspost :)