Need to add 4 numbers to a whole column that already has data it each cell

I have a column with 3000 rows. Each row has a cell with data like this L000141

I need to change each cell and keep what is already there.

I’d like to add 4 numbers after the letter L and keep was already there.

Like this
Change L000141 into L3104000141

How can this be done with a script so all are done at once?

Thanks

Don’t tamper with original data. Use an additional column instead for the new version.

You mean 4 digits.

If a script (macro) should be useful at all, it would need to get passed the digits to be inserted after the “L” for each row.
Do you want to assure that these are the same for all the 3000 rows? I can hardly believe this.
Anyway: give the digits you want to insert in a helper column and insert them by a simple formula in another column.
If you actually insist in destroying the original data, you can copy the new strings (whole column) and paste them (Paste Special…, text only) over to the original column.
See attachment:
disask115079_massInsertDigits.ods (123.8 KB)

no need for a script,
just Finding and Replacing in Calc
L
with
L3104

or with regular expression ticked.
^L
with
L3104

1 Like

Thanks for the different ways to do this.

I went with just Finding and Replacing in Calc and it did exactly what I was looking for… Perfect!

Thanks again