At 09:41 22/08/2014 -0500, Gregory Smith wrote:
I have created a one-dimensional array called CATEGORY. When I do
this function: =Index(Category,25,0) I get the contents of that
index - let's say it is the word "cats". When I do this function
=if((index(category,25,0)="cats"),1,0) I get FALSE?! Anyone have any
ideas what I am doing wrong?
As has already been suggested, the most likely problem is that the
two strings do not exactly match, with one perhaps including one or
more blanks. You'd notice a stray blank in the second formula, but
you might not notice it in the result of the first.
There are some other things you might want to note about your second
formula, in fact - although they will *not* be the cause of your
present problem.
o You do not need to parenthesise the logical expression, so
=IF((INDEX(Category,25,0)="cats"),1,0)
simplifies to
=IF(INDEX(Category,25,0)="cats",1,0)
o You say you get FALSE as the result, which implies that your result
cell(s) must be formatted as Boolean Value. The second and third
parameters in your expression are simply TRUE and FALSE expressed as
numbers, and since these are the obvious default values of optional
parameters, they can be omitted:
=IF(INDEX(Category,25,0)="cats")
o In any case, what you apparently want is simply the value of the
logical expression that is the first parameter, so there is no need
for the IF() function at all. Just use:
=INDEX(Category,25,0)="cats"
I trust this helps.
Brian Barker
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
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.