Excel's Sort dialog only reads cell values, not formulas. Auto-fill a helper column with an Excel Table, or build a formula-sorted view with SORTBY instead.