Ok, to get the result in the correct cell:
H2: =IF(ISBLANK(E2),H1&D2,D2)
I2: =LEN(H2)<LEN(H3)
G2: =IF(ISBLANK(E2),"",INDEX(H2:H102,MATCH(FALSE,I2:I102,0)))
select these three cells and replicate down.
Hide columns I and H
(it does not have to be these columns, but the addresses would have to change appropriately)
Note that I have assumed that there are never more than 100 lines describing the amount...
This should work, but there might be a better way.
Mark.
Bookmarks