Thanks Sambo but this will still leave gaps between cells.
I have done such a thing before but it was matching two dates in columns and insert the matching data in new cell. I used the following function but it's not working on this one for some how which is even easier.

Originally Posted by
Sambo kid
it is a little difficult to tell what you are trying to achieve but guessing at the possible different scenarios you might want to try this in cell C2 =IF(B2>0,A2,0) and this in D2 =IF(C2<>"",B2,0) but I suspect you may actually need something done in visual basic.
Bookmarks