Filter By Certain Characters

jonnyupton

New Member
Joined
Jan 14, 2014
Messages
1
Hi,

I'm wanting to filter my data between three categories:

1. cells that contain O2
2. cells that contain CO2
3. cells that contain CO

I currently have the formula:

=IF(AND(ISNUMBER(SEARCH("O2",L712)),ISERROR(SEARCH("CO2",L712))),TRUE,FALSE)

If the cell (L712) contains only O2 then I get an output of TRUE - this is what I want
If the cell (L712 contains only CO2 then I get an output of FALSE - this is what I want

However,

If the cell (L712) contains O2 and CO2 then I get an output of FALSE - this is not what I want, I want an output of TRUE

Also, the formula doesn't allow the possibility of also filtering based upon CO.

Would anyone be able to suggest a formula which will output TRUE if (O2) or (O2 and CO2) are present in the taget cell (L712)?
Likewise, would anyone be able to suggest a formula which will output TRUE if (CO) or (CO and CO2) are present in the taget cell (L712)?

Thanks in advance for your help.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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