Forum Discussion

Daniel Desmarais's avatar
Daniel Desmarais
Copper Contributor
Nov 28, 2017
Solved

Need help on an IF Function

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...
  • SergeiBaklan's avatar
    Nov 28, 2017

    Hi 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)