Say your shipment id data is on column A and number of samples on column B
and you wanted the desired output beginning C1
on cell C1 simply type your first shipment id and on D1 type 1

Then on C2 type the following:
=IF(COUNTIF($C$1:C1,C1)>INDEX($B$1:$B$700,MATCH(C1,$A$1:$A$700,0))-1,INDEX($A$1:$A$700,MATCH(C1,$A$1:$A$700,0)+1),C1)

And on D2 type the following
=IF(C2=C1,D1+1,1)

Now select C2 and D2 and fill all the way down till you see #N/A



"PPV" <[email protected]> wrote in message
news:[email protected]...
> My request sounds simple, but I have yet been unable to do it.
>
> I have a worksheet with a column that has a shipment id, say "H-5"
> I also have another column that lists the number of samples in that
> shipment, say 3.
>
> I need something that will create two new columns, one with the shipment
> id
> and the other with the sample number. So based on the above entry it would
> create three rows:
> A B
> 1 H-5 1
> 2 H-5 2
> 3 H-5 3
>
> Since there were three samples, it created three entries for each sample
> and
> then would continue on for each entry on the original worksheet, say H-6,
> five samples.
>
> Any suggestions would be greatly appreciated.
> Thanks,
> -Derek