Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Brian Barker schrieb:
At 21:28 18/09/2013 +0100, Mark Bourne wrote:
Carl Paulsen wrote:
I'm trying to build an IF statement that tests if a condition exists
in two columns, and assigns the number 1 if it does, and 0 if not.
The columns being checked are vLookups which return #N/A if an ID is
not found in another table.  I'm trying to search for cases where an
ID# IS returned in two columns meaning the record shows up in both

I can't figure out the syntax for this.  I've tried
IF(AND(A1<>"#N/A"; B1<>"#N/A"),1,0)
on both the vlookup formula columns and on columns that are pasted
without formulas.  No luck yet.  Can someone chime in on this?

  =IF(AND(NOT(ISNA(A1)), NOT(ISNA(B1))),1,0)

Although the cell is displayed as "#N/A", it's not a text value but an
error code indicating that a value is not available. ISNA() returns
TRUE if a cell contains the #N/A error code, and FALSE otherwise.

Indeed.  But it's simpler than that, in fact.  If you apply De Morgan's
laws to the expression
it simplifies to
so we can simplify your formula to

And if you exchange the then- and the else-expression, you can drop the NOT function.


Kind regards

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.