ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Contents (https://www.excelbanter.com/excel-discussion-misc-queries/252438-contents.html)

lightbulb

Contents
 
How do I set up a formula so that if a cell contains certain txt, then the
cell I'm in will display certain text?

For Example, I'm entering the formula in C5, if B5 contains the word
"Assembly" anywhere in it, then I want C5 to say Assembly, otherwise I want
it to copy B5.

Any help?


Dave Peterson

Contents
 
=if(countif(b5,"*"&"assembly"&"*")0,"Assembly",b5 )
or
=if(isnumber(search("assembly",b5)),"Assembly",b5)

=search() ignores upper/lower case.

Use =Find() if case is important.

(=countif() ignores case, too.)

lightbulb wrote:

How do I set up a formula so that if a cell contains certain txt, then the
cell I'm in will display certain text?

For Example, I'm entering the formula in C5, if B5 contains the word
"Assembly" anywhere in it, then I want C5 to say Assembly, otherwise I want
it to copy B5.

Any help?


--

Dave Peterson


All times are GMT +1. The time now is 04:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com