Search code examples
excelexcel-formulaexcel-2010ms-officeexcel-2007

Explain Excel logic X*(Y<0.2)


Can you tell me how this expression is executing?

X * (Y < 0.2)

I understand it like if Y < 0.2 then X should be multiplied by Y. But what will be if Y < 0.2 is not true?


Solution

  • TRUE/FALSE when used in math returns their Boolean Value of 1/0 respectively.

    In this instance when the Y< 0.2 then the expression in the () will be 1 and it will return the value of x, Because 1 * x is x.

    If it is false it will return 0. because 0 * x is 0