One non-array formulas approach ..
Put in C1: =IF(D1="","",SUMIF(B:B,D1,A:A))
(just a slight add to JE's suggestion)
Put in D1:
=IF(ISERROR(SMALL(E:E,ROWS($A$1:A1))),"",
INDEX(B:B,MATCH(SMALL(E:E,ROWS($A$1:A1)),E:E,0)))
Put in E1:
=IF(B1="","",IF(COUNTIF($B$1:B1,B1)1,"",ROW()))
Select C1:E1, copy down as far as required, say to E100
(can copy down ahead of expected data in cols A and B)
Cols C and D will return what you want
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"mikeburg" wrote in
message ...
Great!
However, need cells in column D to come up with the code automatically
& put it in the next row of column D without skipping any cells.
It extremely important that column C's values continue to depend on the
code in column D.
Thanks a million. mikeburg
--
mikeburg
------------------------------------------------------------------------
mikeburg's Profile:
http://www.excelforum.com/member.php...o&userid=24581
View this thread: http://www.excelforum.com/showthread...hreadid=467735