B4=
=SUMPRODUCT(1/COUNTIF(INDIRECT("a"&MAX(IF($A$1:A3=A4,ROW($A$1:A3)))&":a4"),INDIRECT("a"&MAX(IF($A$1:A3=A4,ROW($A$1:A3)))&":a4")))
输入好按CTRL+SHIFT+回车
B4=
=SUMPRODUCT(1/COUNTIF(INDIRECT("a"&MAX(IF($A$1:A3=A4,ROW($A$1:A3)))&":a4"),INDIRECT("a"&MAX(IF($A$1:A3=A4,ROW($A$1:A3)))&":a4")))
输入好按CTRL+SHIFT+回车