Question

At the end of my file I need to include this line

TRYYYYMMDDYYYYMMDD000000000

Here is what I have so far:

="TR"+REPLACE(TODAY(), "/", "")+REPLACE(TODAY(), "/", "")+CountRows().ToString()

How do I add the leading zero's before the CountRows()? There should be 9 digits total for the row count.

My current record returns 28 rows so it should look like 000000028

TR2013102320131023000000028

Was it helpful?

Solution

I think this should do it: right("0000000000000000000"+ CountRows().ToString(), 9)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top