View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Erratic display of concatenation

Colin Hayes wrote...
....
12234-12-56
13498-7-89
85787-cb-78


These should be text.

This is working fine for the vast majority of items but for a few ,
which steadfastly refuse to keep the format the concatenation demands.

For example , a cell that should read 6534-12-10 is in fact reading
1692879. Others show a date , like 10/12/6541

....

Excel is treating these as dates. Excel may even have converted them
into dates. The robust, though redundant way to handle this is to
assume ALL these cells have been converted to dates. So instead of

=B99&C99&D99

where C99 should the catelog number, try

=B99&IF(COUNT(C99),TEXT(C99,"yyyy-m-d"),C99)&D99

Use this for every record (hence the redundancy), and there should be
no problems.