IF Cell Value contains Value A or B enter True

robocop1906

Board Regular
Joined
Jan 15, 2003
Messages
143
I need a formula that basically looks in a cell and if that cell contains certain characters then enter true. Example

If Cell A1 contains Values "Data" Or "Load" then enter True (This formula would be in cell Column B1) if not enter False.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Try:

=OR(NOT(ISERROR(FIND("LOAD",UPPER(A2)))),NOT(ISERROR(FIND("DATA",UPPER(A2)))))

Cumbersome but it works.
 
Upvote 0
robocop1906 said:
The cell contains other data, not only load or Data. How do you say if cell value contains values?

If you want it to be blank if A1 has no value, then use

=IF(A1="","",IF(OR(A1="Data",A1="Load"),"True","False"))
 
Upvote 0
If you need to find "load" or "Data" within the string then use;

IF(OR(FIND("Load",A1,1)<0,FIND("Data",A1,1)<0),"Action if True", "Action if false"

This should work.
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

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