Nov 28 2017 01:59 PM
Hello,
I have 2 questions on the same function.
1. I am wondering If or how to reference cell fill color in an If statement logical test.
2. I am wondering how to have two separate logical tests within the same function.
I am trying to have cell4 calculate cell1-cell2 unless it is 1.filled in yellow or 2. the difference is less than cell3. Here is an example of what I am trying to do:
cell4=IF(cell1="cellfillyellow" or cell1-cell2<cell3,"cell1",cell1-cell2
Can anyone help me?
Nov 28 2017 07:51 PM
SolutionHi Daniel,
That doesn't work such way. Excel formulas are working with cell values only. Color is the property of the cell, you may handle it only using VBA macros.
On the other hand most probably you have some logic behind why this or that cell has this or that color. If you put this logic into the formulas you may combine both. If, for example, the logic is the A1 is yellow if the value in A1 is less than 10, when
A4=IF(OR(A1<10,(A1-A2)<A3),A1,A1-A2)
Nov 29 2017 10:24 AM
Nov 28 2017 07:51 PM
SolutionHi Daniel,
That doesn't work such way. Excel formulas are working with cell values only. Color is the property of the cell, you may handle it only using VBA macros.
On the other hand most probably you have some logic behind why this or that cell has this or that color. If you put this logic into the formulas you may combine both. If, for example, the logic is the A1 is yellow if the value in A1 is less than 10, when
A4=IF(OR(A1<10,(A1-A2)<A3),A1,A1-A2)