#VALUE! error

ericl770

New Member
Joined
Sep 27, 2011
Messages
4
i'm using the "search" function within a "if" function to return a value from a column.

=if(search("co";E6);G6;0)

Meaning : if the caracters "co" (not case-sensitive) is included in the cell E6, return the value from G6, if not return 0 (zero).


When it's true, it does return the value from G6. But when it's false, it says "#VALUE!"

I've tried putting all columns involve in same format, but still does not work !

Please help me !
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
It's because SEARCH returns the #VALUE error when it doesn't find the search string.

Try
=IF(NOT(ISERROR(SEARCH("co", E6))), G6, 0)

Regards
Adam
 
Upvote 0
When a search does not find the criteria it returns an error, not a true or false, so the "if" formula doesn't know what to return. Try turning it around like this:

=IF(ISERROR(SEARCH("co",E6)),0,G6)
 
Upvote 0
I have never seen the semicolon used in a formula before, why are you using that instead of a comma?
 
Upvote 0
COOL !

the "=if(not(iserror(search....)))" thing works !

Don't know why yet, but i will try to understand those functions !

Thanks guys for VERY VERY prompt response ! This forum is amazinG

Thanks again everyone !!!


Eric
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top