Hi,
I'm looking to generate numbers in increments of 1 with the format 'U000000'.
So, the first number will be U000001, then U000002, and so on.
My initial plan was to separate the six digits from the letter U by using MID(Number, 2, 6) and then adding one.
So:
Unfortunately, the above ignores the zeroes at the start of the number and takes 'Separate From the U and Add One' as '0+1=1' which later gives me the number U1. I need the number to maintain the same format throughout and increase in a way that is going to work when going from 'U000000' to 'U000001', but also from 'U009999' to 'U010000'.
Can anyone help me find a way that will get Excel to acknowledge the zeroes every time?
Thanks in advance
I'm looking to generate numbers in increments of 1 with the format 'U000000'.
So, the first number will be U000001, then U000002, and so on.
My initial plan was to separate the six digits from the letter U by using MID(Number, 2, 6) and then adding one.
So:
Code:
LastNumber = "U000000"
SeparateFromTheUandAddOne = (MID(LastNumber, 2, 6)+1)
Unfortunately, the above ignores the zeroes at the start of the number and takes 'Separate From the U and Add One' as '0+1=1' which later gives me the number U1. I need the number to maintain the same format throughout and increase in a way that is going to work when going from 'U000000' to 'U000001', but also from 'U009999' to 'U010000'.
Can anyone help me find a way that will get Excel to acknowledge the zeroes every time?
Thanks in advance