Quick and dirty way.
Set up a row somewhere below your data, say starting at A4 and put the following formula into the cells;
IF(LEN(A1)>=12,LEFT(A1,12),LEFT(CONCATENATE(A1,"123456789012"),12))
Replace the numbers within the quotes in the second part of the concatenate function with whatever filler characters you want.
Edit: Enter the formula into A4 as written above (after an "=") and then drag it across to the right to match the data entries in Row 1. Excel should manage to sort out the cell addresses in the formula because it's written with relative addressing so the formula in D4 should read as follows;
=IF(LEN(D1)>=12,LEFT(D1,12),LEFT(CONCATENATE(D1,"123456789012"),12))
or if you want to use # as the filler edit the filler numbers so it looks like this;
=IF(LEN(D1)>=12,LEFT(D1,12),LEFT(CONCATENATE(D1,"############"),12))
For a string length of 10 it becomes;
=IF(LEN(D1)>=10,LEFT(D1,10),LEFT(CONCATENATE(D1,"##########"),10))