excel数据表,如何每一行数据都按照大小排序? 255
请问一下你这个表是否是只有6列的数据(即三列城市三列数)?如果这样的话,可以给这个表做一个特定的公式处理,如果不只是三列的城市,增加或减少,那么又得重新处理。将下列公式复制后,下拉的结果如图:
H2公式:
=IF(3=RANK(B2,$B2:$F2)+COUNTIF($B2:B2,B2)-1,A2,IF(3=RANK(D2,$B2:$F2)+COUNTIF($B2:D2,D2)-1,C2,IF(3=RANK(F2,$B2:$F2)+COUNTIF($B2:F2,F2)-1,E2,"")))
I2公式:
=IF(3=RANK(B2,$B2:$F2)+COUNTIF($B2:B2,B2)-1,B2,IF(3=RANK(D2,$B2:$F2)+COUNTIF($B2:D2,D2)-1,D2,IF(3=RANK(F2,$B2:$F2)+COUNTIF($B2:F2,F2)-1,F2,"")))
J2公式:
=IF(2=RANK(B2,$B2:$F2)+COUNTIF($B2:B2,B2)-1,A2,IF(2=RANK(D2,$B2:$F2)+COUNTIF($B2:D2,D2)-1,C2,IF(2=RANK(F2,$B2:$F2)+COUNTIF($B2:F2,F2)-1,E2,"")))
K2公式:
=IF(2=RANK(B2,$B2:$F2)+COUNTIF($B2:B2,B2)-1,B2,IF(2=RANK(D2,$B2:$F2)+COUNTIF($B2:D2,D2)-1,D2,IF(2=RANK(F2,$B2:$F2)+COUNTIF($B2:F2,F2)-1,F2,"")))
L2公式:
=IF(1=RANK(B2,$B2:$F2)+COUNTIF($B2:B2,B2)-1,A2,IF(1=RANK(D2,$B2:$F2)+COUNTIF($B2:D2,D2)-1,C2,IF(1=RANK(F2,$B2:$F2)+COUNTIF($B2:F2,F2)-1,E2,"")))
M2公式:
=IF(1=RANK(B2,$B2:$F2)+COUNTIF($B2:B2,B2)-1,B2,IF(1=RANK(D2,$B2:$F2)+COUNTIF($B2:D2,D2)-1,D2,IF(1=RANK(F2,$B2:$F2)+COUNTIF($B2:F2,F2)-1,F2,"")))
有的是四列哦,