Going off your answer with the correct formula, you can simplify the code quite a bit and add more readability by doing the following:
確定! 回上一頁