把公式改成如下试试? SortCol(GridName,"笔试成绩",2) And SortCol(GridName,"总成绩",2) And SortCol(GridName,"职位",2) And SortCol(GridName,"报考单位",2) And EvalFor(GridName,"名次","if(Row=1,1,if([职位] <> cell(Row-1,""职位"") Or [报考单位] <> cell(Row-1,""报考单位""),cell(Row-1,""名次""),cell(Row-1,""名次"")+1))")