What you are doing looks very odd. Your formula is incorrect. As you have not provided expected answers clearly enough, I do not know what you want to see. please remove the non-working fomulae in the sheet and repost it with manually calculated expected answers.