Hello,
I was hoping someone could help.
I am trying to create a function that will assign a value depending on if the word; dimond, gold or diamond and gold appear anywhere in a field.
I have tried =IF(FIND("diamond";D25);"Diamond";IF(FIND("gold";D25);"Gold";0))
But this only works for the first find function (diamond) and does not return any result for the second find function (gold)
Thank you for taking the time to read the post and if you can help I would be very greatful
Regards Liam
[Solved] IF a field contains ref2 or ref2 or ref1+ref2
[Solved] IF a field contains ref2 or ref2 or ref1+ref2
Last edited by Hagar Delest on Wed Jun 25, 2008 12:05 pm, edited 1 time in total.
Reason: tagged the thread as Solved.
Reason: tagged the thread as Solved.
OOo 2.4.X on Ms Windows XP
Re: IF a feild contains ref2 or ref2 or ref1+ref2 anywhere
The FIND function produces an error if there is no match. Once any part of a formula results in an error, the whole formula result is an error.
You have to explicitly test for an error result using something like =IF(ISERR(FIND(...
You have to explicitly test for an error result using something like =IF(ISERR(FIND(...
AOO4/LO5 • Linux • Fedora 23
Re: IF a feild contains ref2 or ref2 or ref1+ref2 anywhere
I get error Err:508
OOo 2.4.X on Ms Windows XP
Re: IF a feild contains ref2 or ref2 or ref1+ref2 anywhere
Which is, according to the help files, a bracketing error. Resolve it. The function wizard is a useful tool (Ctrl+F2).ldkemp wrote:I get error Err:508
Code: Select all
=IF(isnumber(FIND("diamond";D25));"Diamond";IF(isnumber(FIND("gold";D25));"Gold";0))
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: IF a feild contains ref2 or ref2 or ref1+ref2 anywhere
Thank you very much, that has worked a charm.
Regards Liam
Regards Liam
OOo 2.4.X on Ms Windows XP