Excel Question

Posted by: tahir

Excel Question - 16/10/2013 10:07

I need to create a unique ID ("SupplierCode.xxxxxx") where SupplierCode is one of the columns, the sequential number is generated on a per supplier basis.

Any ideas? (Hope the above makes sense)
Posted by: larry818

Re: Excel Question - 16/10/2013 14:06

How about:

="SupplierCode"&ROW()

If they are all in the same column and you never change rows.
Posted by: K447

Re: Excel Question - 16/10/2013 14:27

I think there is a method for pre-populating a selected column with sequential 'serial' numbers. Forget what that is called, at the moment.

Select the column area that needs the numbers, activate the command and you should have your number series. This assumes that you know or can predict the total number of 'serial numbers' you need.
Posted by: andy

Re: Excel Question - 16/10/2013 14:59

=A2&"."&(COUNTIF(INDIRECT("A$1:A"&ROW()-1), A2)+1)

The SupplierCode needs to be in column A, this would go in B2. Which would result in this:

[img]https://photos-3.dropbox.com/t/0/AAAlUyo...-VVelKcthEp3clQ[/img]

What the formula does is look back up the A column and counts all the supplier codes that match the supplier code on the current row. Then it adds one to the count and uses that for the sequential number. So each supplier gets their own incrementing set of numbers.

I am probably being over complicated with the INDIRECT, this works just as well:

=A2&"."&(COUNTIF(A$1:A1, A2)+1)
Posted by: andy

Re: Excel Question - 16/10/2013 15:01

Why have dropbox made it such a pain to get a working link to an image nowadays *sigh*

(I know why, but it is still a pain)
Posted by: Phoenix42

Re: Excel Question - 16/10/2013 15:58

imgur is painless to use for images that you don't care who sees
Posted by: tahir

Re: Excel Question - 16/10/2013 16:00

Thanks guys but I managed to sort it, with the following:

=(COUNTIF($D$1:D2,D2))

AND

=D2 & "." & TEXT(AD2,"000000")