refine excel formula and fix a few typos