Ask Your Question
0

Why does SEARCH with regular expression (regex) fail with #VALUE!

asked 2017-03-03 10:28:28 +0100

Andy gravatar image

I just don't get it /:

I'm trying a very very simple SEARCH (formula) for numbers:

=SEARCH(A1;"[0-9]")

and it fails, no matter if the A1 is empty, contains text, or numbers.

It gives me #VALUE! as an error.

Why is that?

edit retag flag offensive close merge delete

Comments

Enable regular expressions option is activated.

Andy gravatar imageAndy ( 2017-03-03 10:30:53 +0100 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2017-03-03 10:41:45 +0100

erAck gravatar image

Because

  1. it should be =SEARCH("[0-9]";A1) i.e. the arguments swapped
  2. Tools→Options→Calc → Enable regular expressions in formulas must be active
edit flag offensive delete link more
0

answered 2017-03-03 10:42:47 +0100

Wrong order.

edit flag offensive delete link more
0

answered 2017-03-03 10:40:47 +0100

karolus gravatar image

If you would read the HELP for SEARCH, you maybe would realize that's the search-expression should be the first argument…not the second

edit flag offensive delete link more

Comments

You don't need to be offensive, man – don't you think I googled and read several help pages? It's an easy to miss detail.

Andy gravatar imageAndy ( 2017-03-03 13:41:34 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-03-03 10:28:28 +0100

Seen: 1,130 times

Last updated: Mar 03 '17