Currently, i am using
Cells(i, 6) & ("-000") & (q)
to generate my code. But I realise that when q
becomes a 2 digit int (i.e 11
), the output is like 16-00011
, which I don't want. I want the output to be like 16-0011
.
Currently, i am using
Cells(i, 6) & ("-000") & (q)
to generate my code. But I realise that when q
becomes a 2 digit int (i.e 11
), the output is like 16-00011
, which I don't want. I want the output to be like 16-0011
.
Try this using
Format
:Documentation for
Format
: https://msdn.microsoft.com/en-us/library/office/gg251755.aspx