Freelancer:
abaraiya
I have done what you want..Look at my entry
I have done want you want with formulas. You can see formulas in highlighted yellow cells