[英]Conditional Formatting (If cell above and below is number, format only cell below)
I'am trying to create a conditional formatting which formats only cell below, but only if cell above and cell below both has number in them (negative or positive). 我正在尝试创建一个条件格式,该格式仅格式化下面的单元格,但是仅当上面的单元格和下面的单元格中都具有数字(负数或正数)时才格式化。
Now i got this: 现在我得到了:
=ISNUMBER(OFFSET(INDIRECT(ADDRESS(ROW(); COLUMN()));-1;0))
This formats the cell below if the cell above has a anything. 如果上方的单元格包含任何内容,则会格式化下方的单元格。 It does not respect the condition where the cell below also must have a number. 它不遵守以下单元格也必须具有数字的条件。
Could somebody help me out here? 有人可以帮我吗? I am realy stuck :) 我真的很困:)
EDIT: 编辑:
So now i tried this: 所以现在我尝试了这个:
=AND(ISNUMBER(INDIRECT(ADDRESS(ROW();COLUMN()))); ISNUMBER(OFFSET(INDIRECT(ADDRESS(ROW();COLUMN()));-1;0)))
But no luck whith this one either. 但也没有运气。
Just to clarify. 只是为了澄清。 This formula should run on $A$3:$BB$100 该公式应在$ A $ 3:$ BB $ 100上运行
So for example if: 因此,例如:
A5 = 10 (or any positive or negative number) A5 = 10(或任何正数或负数)
A6 = 10 (or any positive or negative number) A6 = 10(或任何正数或负数)
A6 should be formatet. A6应该是格式。
But if: 但是如果:
A5 = 10 (or any positive or negative number) A5 = 10(或任何正数或负数)
A6 = EMPTY A6 =空
No formating should happen. 不应进行格式化。
Hope this clarify what i'am trying to do :) 希望这可以澄清我正在尝试做的事情:)
=AND(ISNUMBER(A5),ISNUMBER(A6)) This formula will also bypass formatting for A6 as well if both cells are empty. = AND(ISNUMBER(A5),ISNUMBER(A6))如果两个单元格都为空,此公式也将绕过A6的格式设置。 I assume that's what you want, as there's no value within either to format. 我认为这就是您想要的,因为这两种格式都没有价值。
I see why we are getting different results with the formula. 我明白了为什么我们在公式中得到不同的结果。 Conditional formatting is applied relative to the active cell when applied. 条件格式设置是在应用时相对于活动单元格应用的。 Start with cell A2 as the first cell highlighted, (A2:A100),and then use this formula =AND(ISNUMBER(A2),ISNUMBER(A1)).Cell A2 should be the first active cell within the range of applied formatted cells. 以单元格A2作为第一个突出显示的单元格(A2:A100),然后使用此公式= AND(ISNUMBER(A2),ISNUMBER(A1))。单元格A2应该是已应用格式的单元格范围内的第一个活动单元格。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.