为什么这个excel公式会为条件格式返回不同的结果? [英] Why does this excel formula return different results for conditional formatting?

查看:270
本文介绍了为什么这个excel公式会为条件格式返回不同的结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是一些演示数据:





您可以看到列B中使用的公式为任何连续的重复项返回TRUE,但是当用作$ A $ 1:$ A $ 14的CF条件时,它会返回不同的结果?



这是CF设置:



解决方案

因此,如果前身或后继者的值相同,则条件为真。



在条件格式中,您可以考虑行号为圆形。因此, A1 的前身是 A1048576 ,还有 A1048576 A1



与列号一样。 XFD 跟随 A



所以你的公式条件格式是:

  = OR(A1048576 = A1,A1 = A2)

  = AND(A1& ;,OR(A1048576 = A1,A1 = A2))

/ p>

作为表格公式,这将无法正常工作。那里

  = OR(IFERROR(INDIRECT(A& ROW(A1)-1)= A1,FALSE) A1 = A2)

需要。


Here is some demo data:

You can see the formula used in Column B returns TRUE for any consecutive duplicates, but when used as a CF condition on $A$1:$A$14 it returns different results?

Here is the CF setup:

解决方案

So the condition shall be true if either the predecessor or the successor is the same value.

Within conditional formatting you can think about the row numbers as circular. So the predecessor of A1 is A1048576 and also the successor of A1048576 is A1.

The same is with the column numbers. After XFD follows A.

So your formula for the conditional formatting is:

=OR(A1048576=A1,A1=A2)

or

=AND(A1<>"",OR(A1048576=A1,A1=A2))

for excluding empty cells.

As sheet formula this will not work. There

=OR(IFERROR(INDIRECT("A"&ROW(A1)-1)=A1,FALSE),A1=A2)

is need.

这篇关于为什么这个excel公式会为条件格式返回不同的结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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