Please find the attached solution. Please let me know whether you are looking for different solution.

data_Vinodh.xls

Thanks,
Vinodh.T, Erode