Question:

Help with Excel Syntax

by  |  earlier

0 LIKES UnLike

I've been struggling with creating a dummy variable in excel.

I want to put number "1" if a name contains the word "apple". If the name doesn't contain the word "apple", then I want "0".

Could anyone please hellppppppp.....

Thanks so much!

 Tags:

   Report

2 ANSWERS


  1. If your string you want to search is in cell A1, then enter this:

    =IF(ISERROR( SEARCH("apple",A1)),0,1)

    into cell B1, and it will return a 1 if 'Apple' appears in A1 or 0 if not.

    You can then copy this down if needed.


  2. =IF(SEARCH("Apple";A1;1)>0;1;0)
You're reading: Help with Excel Syntax

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions