Hello jannamunion and Welcome to Excel Forum.
In row 2 of the file attached to post #1 we see the results of the current formulas, which the note in row 5 indicates are not correct. I might help us come up with formulas/code if you could tell us with the correct results that those cells should display.
Let us know if you have any questions.