Forum Discussion

Tony2021's avatar
Tony2021
Steel Contributor
Oct 04, 2022
Solved

Data Validation and IF

Hello,

I need to limit the input of range of cells in Column C based on following criteria:

 

if B2>A2 then C2 must be >0
if B2<A2 then C2 must be <0
if B2=A2 then C2 must be =0

 

Please see attached file. 

thank you

  • Detlef_Lewin's avatar
    Detlef_Lewin
    Silver Contributor

    Tony2021 

    Rule 2 is not possible unless you are doing time travel into the past.

     

    =SIGN(C2)=SIGN(B2-A2)
    • Tony2021's avatar
      Tony2021
      Steel Contributor
      that was perfect! Ingenious. FYI: that rule 2 is possible though. Your solution worked perfectly!

      Quadruple: I am not sure if I was using it correctly but it didnt seem to return the result I was expecting.

Resources