E
E
ellesar20012013-01-18 16:46:23
Google
ellesar2001, 2013-01-18 16:46:23

Formulas in Google SpreadSheet

Friends, I will forgive the help of the hall!

There is a simple, at first glance, task to search in a cell by substring. If a certain substring is present, then we output the value of another cell, if not, we output 0. In the tables of the Evil Corporation, it was not possible to win.

=if(find('str';A1);A2;0); - does not work. And all because (from the manual):

If the text cannot be found, a #VALUE error message will appear.


How to be?

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
ghosthope, 2013-01-18
@ellesar2001

Use like this
=if( iferror( find( "str"; A1 ) ); 0; A2 )

K
kreol2013, 2013-01-21
@kreol2013

You may find my article helpful. habrahabr.ru/post/157933/ If there are problems with the formulas, please contact us, we will try to help. With uv. Anton

G
ghosthope, 2013-01-18
@ghosthope

There is an ECMA-376 specification that describes the functions that are accepted in Open Office XML, the find function has the following description:
FIND ( string-1, string-2 [, start-pos ] )
Description: Performs a case-sensitive search using a lexical comparison for the first occurrence of string-1 in string-2, starting at character position start-pos within string-2.
— string-1 is not found within string-2, #VALUE! is returned.
— start-pos designates a position outside string-2, #VALUE! is returned.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question