Rather than sort the original table (since this messes up your rank formulae) make a pivot table and refresh it when the data gets updated.
See pivot table at cell Q3 in the attached.
Note, that to keep the 2 districts of SANGGUNIANG PANLALAWIGAN separate I edited the cells A76:A89 and A91:A98 to reflect this.
|