Pawel
Pawel

Reputation: 555

Formula returning #VALUE! - Remove

I've written a formula to correct strings in cells using PROPER formula, it looks like this:

=IF(SEARCH("*"&" "&"*",A1),PROPER(A1),"")

The problem is that when logical test is not fulfilled formula returns #VALUE!, I would like it to return just "" value.

Please help.

Upvotes: 0

Views: 85

Answers (1)

zipa
zipa

Reputation: 27879

Wrap your formula with IFERROR(). It takes two arguments value and value_if_error. In your example it would look like =IFERROR(IF(SEARCH("\*"&" "&"\*",A1),PROPER(A1)),"").

Upvotes: 2

Related Questions