Well, there were some problems with data, which could made your attempts less effective :-P.
First - you were inconsistant with formulas. In column D there were sometimes , sometimes =
Second - unfortunately, due to floating point accuracy some numbers did not match exactly - read for instance here: http://support.microsoft.com/kb/78113
After correcting first (not tested if it really influenced the matching) and taking into account second problem, following macro:
Seems to work fine and quick enough on test data. Of course on larger datasets it will take some time to complete (writing directly into spreadsheet is time-consuming process). I'd expect something like "go for one coffe" ;-) for 30000 rows of mostly matching data.
See attached workbook. Note that it also takes into account date (sequence of events in time) - see for instance rows 57-60 of output sheet.
Best Regards,
Bookmarks