Page 1 of 2 12 LastLast
Results 1 to 10 of 11

IF Cell Value contains Value A or B enter True

This is a discussion on IF Cell Value contains Value A or B enter True within the Excel Questions forums, part of the Question Forums category; I need a formula that basically looks in a cell and if that cell contains certain characters then enter true. ...

  1. #1
    Board Regular
    Join Date
    Jan 2003
    Posts
    143

    Default IF Cell Value contains Value A or B enter True

    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.

  2. #2
    MrExcel MVP fairwinds's Avatar
    Join Date
    May 2003
    Posts
    8,633

    Default Re: IF Cell Value contains Value A or B enter True

    Try:

    =OR(A1="Data",A1="Load")
    "Fair Winds and Following Seas"

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Ahmedabad Gujarat
    Posts
    303

    Default Re: IF Cell Value contains Value A or B enter True

    write formula in cell b1

    =OR(D14 = "data",D14 = "load")

    ohh it is there..
    ni****h desai
    Mindful act is consecration only road to salvation.

  4. #4
    Board Regular LTunnicliffe's Avatar
    Join Date
    May 2003
    Location
    Round Rock, TX
    Posts
    767

    Default

    Try:

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

    Cumbersome but it works.
    Loren

    The numbers don't lie, but sometimes they don't tell the whole truth.

  5. #5
    Board Regular
    Join Date
    Jan 2003
    Posts
    143

    Default Re: IF Cell Value contains Value A or B enter True

    The cell contains other data, not only load or Data. How do you say if cell value contains values?

  6. #6
    Board Regular
    Join Date
    May 2003
    Posts
    1,037

    Default Re: IF Cell Value contains Value A or B enter True

    This works for me.

    =IF(OR(A1="Data",A1="Load"),"True","False")

  7. #7
    Board Regular
    Join Date
    May 2003
    Posts
    1,037

    Default Re: IF Cell Value contains Value A or B enter True

    Quote Originally Posted by robocop1906
    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"))

  8. #8
    Board Regular
    Join Date
    Nov 2003
    Location
    What's it called?
    Posts
    119

    Default Re: IF Cell Value contains Value A or B enter True

    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.
    I didnt get where I am today by quoting 70's sitcoms.

  9. #9
    Board Regular LTunnicliffe's Avatar
    Join Date
    May 2003
    Location
    Round Rock, TX
    Posts
    767

    Default

    Did you try my solution???
    Loren

    The numbers don't lie, but sometimes they don't tell the whole truth.

  10. #10
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    64,764

    Default Re: IF Cell Value contains Value A or B enter True

    ******** ******************** ************************************************************************>
    Microsoft Excel - Book1___Running: xl2000 : OS = Windows NT 4
    (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)bout
    =

    A
    B
    C
    D
    1
    Data*loaded*on*MTRUE**
    2
    Bad*dataTRUE**
    3
    Heavy*LoadTRUE**
    4
    M*is*downFALSE**
    5
    ****
    Sheet1*

    [HtmlMaker 2.32] To see the formula in the cells just click on the cells hyperlink or click the Name box
    PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.


    B1:

    =COUNT(SEARCH({"Data","Load"},A1))>0

Page 1 of 2 12 LastLast

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com