Francisco
Francisco

Reputation: 391

Excel if condition

I'm doing an if condition in Excel:

=IF(M1071="Si";1;0)

I want to find the Si value in a cell and return the number 1, or else return O.

However the cells don't just have Si, the names have more characters such as C8H20O2SSi2Si2

Any idea how to search the cell that have Si?

Upvotes: 0

Views: 263

Answers (2)

Peter Albert
Peter Albert

Reputation: 17475

Assuming that you have a list of elements that you want to filter for rows that contain Si, you can alternatively just use the Autofilter directly. First apply the autofilter to the range you want to filter (in the Data tab->Sort & Filter->Filter - or press Ctrl-Shift-L)

In the column that you want to search for Si, click on the filter arrow in the top row and select Text filters->Contains... - and enter Si here.

Upvotes: 1

Peter L.
Peter L.

Reputation: 7304

Use this: =IF(ISERROR(FIND("Si";M1071));0;1).

Upvotes: 3

Related Questions