hi Jonmo1,

thanks very much, your formula worked perfectly. Unfortunately I have to use that formula on about 15000 rows in my worksheet. Is there anyways I can apply the following two formulas to a macro which could be called when another VBA macro is run (which generates the data from which your formula works)?:

=LEFT(CA2,15)
=CB2&COUNTIF($CB$2:CB2,CB2)

thanks!!