Super User Asked by litalr on November 22, 2021
I’m trying to use IF
and OR
together. Both of the OR
statements are true (I checked them separately and it works). Combined together the IF
statements show FALSE
, although both of them are TRUE
, and also if only one was TRUE
it should’ve returned TRUE
.
data:
ref table:
IF(OR(B2072=VLOOKUP(B2072,'Ref table'!AA3:$AB$20,1,0), C2072=SEARCH("administrativ*",C2072)), "other")
The answer is this: what you describe CAN'T happen.
You say the result is FALSE
which REQUIRES each of the OR()
's to be FALSE
: NOT errors, but actual FALSE
results. Yet they neither of them can ever be FALSE
. They both can either be TRUE
or be an error.
Specifically, the second condition can almost never be true because SEARCH()
returns a number (the position the found string begins) so to EVER be TRUE
, the cell would have to contain only numerals, yet the search can only give a non-error result if it has that text in it. Ergo, it can NEVER be TRUE
as used and therefore will always give an error, not a FALSE
. OR()
returns an error in that case, not a FALSE
(indeed, simply setting that portion to an "=" as a standalone formula does the same), so you could never have gotten TRUE
from that half, even though you say you do in your post.
So something important must be missing, or wrong. Without more, or accurate information, no one here can help you.
Same, by the way, with the first half: it either returns TRUE
(which it can, as used here, unlike the second half), or it returns an error. But never a FALSE
, so as long as it is TRUE
, it is not the problem. Not true? Well, an error is an error and the IF()
will return an error, NOT a FALSE
.
Folks want to help you, so consider your information and try to see where it's wrong or incomplete. For example, one figures the two conditions really do produce FALSE
's as standalong things, so what's different in the post from the actual spreadsheet? That's a good starting point.
And either way, that second condition simply HAS to be different than posted. As used here, it can never give anything but an error not a FALSE
(it could give that in other conditions, but not in these). So looking at that is a good idea. Then folks can help. They do want to.
Answered by Jeorje on November 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP