Oh my god, I changed the formula on first line and forgot to change the rest accordingly ...

I have changed the attachment on post #5, please check it again.