pingguagain 发表于 2012-12-11 05:58 
I guess you are asking how to implement it in EXCEL. Here is one way:
Type         Year        Sale        Cum_Sale
A        1 ...
It seems that some Year 2 data are ahead of Year 1. Are you allowd to sort the data based on Year first? If not, it seems hard to use sumif here. However, it is easy to implement it using VBA to write a few lines of code.