GROUP NUMBERING
This formula will check to see if the data is in the second row. If
it is, it places a 1 in the Seq Number field becuase that yould be the
first record (assuming headers are being used).
It then compares the left 12 characters of the current rows UPI number
to the left 12 characters of the UPI number above it. If they are the
same, it takes on the same number as the one above. If they are
different, it adds one to the seq number.
To acheive the leading zero format, you can apply a custom format to
the cells and enter 0000 ito the type field.
=IF(ROW()=2,1,IF(LEFT(A2,12)=LEFT(A1,12),B1,B1+1))
HTH
-Jeff-
Polarbilly wrote:
I need to create a number sequence file for data listed as shown.The groups
would be created from the first 12 digits. Example:
UPI SEQUENTIAL NUMBER
8DEB90020849A059 0001
8DEB90020849B059 0001
8DEB90022591A059 0002
8DEB90022591B059 0002
8DEB90022796A059 0003
8DEB90022796B059 0003
8DEB90022796C059 0003
8DEB90022796D059 0003
thanks in anticipation
Bill
|