View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Phil Delaney Phil Delaney is offline
external usenet poster
 
Posts: 3
Default Calculate a sentences width based on lookup

Hi,

I have a spreadsheet made up of 2 columns. The first with lower case characters a-z and following that upper case A-Z, then following that numbers 1 through to 0, then a few punctuation marks and a blank (space). In the second column is a reference to the px width of each character.

We want to be able to take a given sentence in a cell and calculate the width of all the characters and when this hits an X limit, break the line (second line) and then calculate the remainder, but break again for a third or fourth line (with different X values). There may be 1, 2, 3 or 4 lines in total.