Ask Your Question
0

search function

asked 2017-12-31 18:37:26 +0200

Mannesty gravatar image

If I use the function Search("any text string", A1) and cell A1 contains "Insert any text string here", the function returns the number 8 as the starting position of the text I've searched for.

If the cell A1 contains "Insert any text tring here", the search function returns #Value!

What am I doing wrong?

I've used Microsoft's Excel for years and I'm trying to switch to LibreOffice.

Kind regards, Peter Smith.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-12-31 21:09:31 +0200

librebel gravatar image

Hello @Mannesty,

If the search pattern was not found in your cell A1, then the SEARCH() function returns "#VALUE". If you want a custom message in case the search pattern wasn't found, then you could use the IFERROR() function like this:

=IFERROR( SEARCH("any text string",A1),"<Not Found>")

HTH, lib

edit flag offensive delete link more

Comments

Thanks for your reply.

The actual formula that works in Excel but not in LibreOffice Calc is IFERROR(IF(SEARCH("Redexis Gas Murcia",$F16)>0,$Q16,$R16),"")

I've now rewritten it to work in LibreOffice Calc.

Thanks for your help.

Mannesty gravatar imageMannesty ( 2017-12-31 21:55:48 +0200 )edit

It sounds like this answered your question, so please mark the answer as correct. See guidelines for asking.

Jim K gravatar imageJim K ( 2018-01-01 21:35:39 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-12-31 18:37:26 +0200

Seen: 2,496 times

Last updated: Dec 31 '17