检查MS Excel中是否有两行是EXACT SAME [英] Check if two rows are the EXACT SAME in MS Excel

查看:154
本文介绍了检查MS Excel中是否有两行是EXACT SAME的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MS Excel中,查看两行是否完全相同的最佳方式是什么?我已经尝试过条件格式化,但它似乎只能检查重复的CELLS而不是整行。感谢您的帮助!

解决方案

您需要一个数组公式来比较2行。



如果您想了解第1行和第2行是否完全相同,请在不在第1行或第2行的单元格中输入此公式:

  = AND(EXACT(1:1,2:2))

而不是按键入公式后输入,请按 Ctrl + Shift + 输入 ,这将告诉Excel你想要一个数组公式。



如果它们匹配,结果将为TRUE,如果没有匹配则为FALSE。如果您已正确输入数组公式,那么您将会看到公式周围的大括号。



请注意,EXACT公式将执行区分大小写的比较。如果您想要区分大小写的比较,请忽略它:

  = AND(1:1,2:2)

输入 Ctrl + Shift + 输入



最后一件事:如果要检查行的一部分而不是整行,只需在公式中指定。

  = AND(EXACT(A1:E1,A2:E2))


输入 Ctrl + Shift + 输入

In MS Excel, what is the best way to see if two rows are the exact same? I've tried with conditional formatting but it only seems like I can only check for duplicat CELLS and not whole rows. Thanks in advance for the help!

解决方案

You need an array formula that compares the 2 rows.

If you want to find out if rows 1 and 2 are exactly the same, enter this formula in a cell that isn't in row 1 or 2:

=AND(EXACT(1:1,2:2))

Instead of pressing Enter after typing the formula, press Ctrl + Shift + Enter, which will tell Excel you want an Array formula.

The result will be TRUE if they match and FALSE if they don't. You'll see curly braces around your formula if you've correctly entered it as an array formula.

Note that the EXACT formula will perform a case-sensitive comparison. Omit it if you want a case-insensitive comparison:

=AND(1:1,2:2)

entered with Ctrl + Shift + Enter as well.

One last thing: if you want to check part of a row instead of the whole row, simply specify that in the formula.

=AND(EXACT(A1:E1,A2:E2))

entered with Ctrl + Shift + Enter, of course.

这篇关于检查MS Excel中是否有两行是EXACT SAME的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆