• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Conditional formula based on a word in a cell

arif

Member
Sir

Is it possible to put a formula or an output based on only a single world in a particular cell

like

I have this line in cell B4:

I have become awesome in excel now

Now i want to put formula

If cell B4 has a word "awesome" put 100 in C4 else put 0

is that possible (find attached file here)
 

Attachments

  • Condition based on a single word in a line.xlsx
    7.3 KB · Views: 6
Hi @arif.

Try this formula in D4:
PHP:
=IF(ISNUMBER(SEARCH("arif",C4)),100,1000)

Please Comment!
I hope it helps. Blessings!
 
Last edited:
Please find attached the answer.

Kindly let me know if you have any clarification.
 

Attachments

  • Condition based on a single word in a line.xlsx
    7.7 KB · Views: 5
Arif
Your question above asks for 0
The question in the sheet asks for 1000

=IFERROR(IF(SEARCH("Awesome",C4)>0,100,),0)
or
=IFERROR(IF(SEARCH("Awesome",C4)>0,100,),1000)
 
Thanks a lot

Just so blessed i m to get the solution

but is it possible to use or formula with it like

if C4 has "arif" then put 100 if "anmol" put 1000 and if "awesome" put 0 else 120

plz suggest
 
Thanks a lot

Just so blessed i m to get the solution

but is it possible to use or formula with it like

if C4 has "arif" then put 100 if "anmol" put 1000 and if "awesome" put 0 else 120

plz suggest
 
For your new post, you can try this formula:

=IFERROR(INDEX({100;1000;0},MATCH(TRUE,ISNUMBER(SEARCH({"arif";"anmol";"awesome"},C4)),)),120)

Or if your conditions change all time, you can try put a aux list, and refer to it into your formula, like I show you in the file.

Please check it and comment! Blessings!
 

Attachments

  • Condition based on a single word in a line.xlsx
    8.7 KB · Views: 8
Back
Top