Dear CJ_London
I tried your sql code but couldn't achieve the desired results. In order to have a better view of my problem i have attached an excel file that gives me the desired result. Please check the formula in the excel file and try to achieve the same using access file.
tnks in advance.