Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#359969 - 16/10/2013 10:07 Excel Question
tahir
pooh-bah

Registered: 27/02/2004
Posts: 1900
Loc: London
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)

Top
#359970 - 16/10/2013 14:06 Re: Excel Question [Re: tahir]
larry818
old hand

Registered: 01/10/2002
Posts: 1033
Loc: Fullerton, Calif.
How about:

="SupplierCode"&ROW()

If they are all in the same column and you never change rows.

Top
#359971 - 16/10/2013 14:27 Re: Excel Question [Re: larry818]
K447
old hand

Registered: 29/05/2002
Posts: 798
Loc: near Toronto, Ontario, Canada
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.

Top
#359972 - 16/10/2013 14:59 Re: Excel Question [Re: tahir]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
=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)


Edited by andy (16/10/2013 15:09)
_________________________
Remind me to change my signature to something more interesting someday

Top
#359973 - 16/10/2013 15:01 Re: Excel Question [Re: andy]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
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)
_________________________
Remind me to change my signature to something more interesting someday

Top
#359974 - 16/10/2013 15:58 Re: Excel Question [Re: andy]
Phoenix42
veteran

Registered: 21/03/2002
Posts: 1424
Loc: MA but Irish born
imgur is painless to use for images that you don't care who sees

Top
#359975 - 16/10/2013 16:00 Re: Excel Question [Re: andy]
tahir
pooh-bah

Registered: 27/02/2004
Posts: 1900
Loc: London
Thanks guys but I managed to sort it, with the following:

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

AND

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

Top