楼主 罗刚君 |
Q:如何时计算两列的相同项与不同项? A:计算两列数据的相同项与不同项举例如下: 不同项- =IF(ROW(A1)<=COUNT(0/COUNTIF(A$1:A$4,B$1:B$4)),INDEX(A:A,LARGE(IF(COUNTIF(B$1:B$4,A$1:A$4)=0,ROW($1:$4)),ROW(A1))),INDEX(B:B,LARGE(IF(COUNTIF(A$1:A$4,B$1:B$4)=0,ROW($1:$4)),ROW(A1)-COUNT(0/COUNTIF(A$1:A$4,B$1:B$4)))))
相同项- =INDEX(A:A,LARGE(IF(COUNTIF(B$1:B$4,A$1:A$4),ROW($1:$4)),ROW(A1)))
|
2楼 rongjun |
不同项公式可以简化一下:
- =INDIRECT(TEXT(SMALL(IF(COUNTIF(OFFSET($A$1,,{1,0},4),$A$1:$B$4),99,ROW($1:$4)*10+{1,2}),ROW(A1)),"r0c0"),0)&""
|
3楼 kszcs |
RONG版:
=INDIRECT(TEXT(SMALL(IF(COUNTIF(OFFSET($A$1,,{1,0},4),$A$1:$B$4),99,ROW($1:$4)*10+{1,2}),ROW(A1)),"r0c0"),0)&""
400行的数据,怎么修改? 谢谢 |
4楼 rongjun |
- =INDIRECT(TEXT(SMALL(IF(COUNTIF(OFFSET($A$1,,{1,0},400),$A$1:$B$400),9999,ROW($1:$400)*10+{1,2}),ROW(A1)),"r0c0"),0)&""
|
5楼 poiuyman5 |
Good Job |