PDA

View Full Version : [SOLVED:] Formula with OR condition does not return expected result



vangog
09-26-2022, 01:19 AM
Formulae:


=(ROUND(QUARTIL(E62:E70;2);3)=ROUND(E62;3))*AND(ROUND(E62;3))=300

Result is FALSE. Expected True.

Check:

=(ROUND(QUARTIL(E62:E70;2);3)=ROUND(E62;3))
and

=(ROUND(E62;3))=300

The image bel
ow contains incorrect operator, should be AND.

arnelgp
09-26-2022, 02:23 AM
maybe:

=AND(ROUND(QUARTILE(E62:E70;2);3), ROUND(E62;3);300)

Aflatoon
09-26-2022, 02:26 AM
If you actually wanted OR, it's in the wrong place:

=OR(ROUND(QUARTIL(E62:E70;2);3)=ROUND(E62;3);ROUND(E62;3)=300)

Aussiebear
09-26-2022, 03:24 AM
I've taken the time to breakdown your function into mini tests

"=Quartile(E62:E70,2)" returns 300
"=Round(Quartile(E62:E70,2),3)" returns 300
"=Round(E62,3)" returns 300
"=Or(Round(E62,3)" returns True
"=Round(E62,3)*Or(Round(E62,3)" returns 300
"=Round(Quartile(E62:E70,2),3)=Round(E62,3)*Or(Round(E62,3))" returns 300

So I can't find any fault on this Mac

snb
09-26-2022, 03:52 AM
The quartile of a range that encompasses E62 can only be equal to E62 if the range doesn't contain any values at all, other than the value in E62.
To test for blank cells in a range a simpler method in Excel is available.

vangog
09-26-2022, 04:35 AM
Sorry. When I have translated from my local language, I changed AND function to OR. But thank you, now it is clear to me how OR/AND works in Excel.