+ Reply to Thread
Results 1 to 4 of 4

IF AND Statement help

Hybrid View

  1. #1
    Registered User
    Join Date
    01-07-2013
    Location
    Indianapolis, IN
    MS-Off Ver
    Excel 2010
    Posts
    2

    IF AND Statement help

    I need help formatting a formula. I want to check to see if a single cell is = a value and if a series of cells contain a certain value.

    IF(AND(A1 = TEST, (B1:H1, "*S2*"),"Testing","")

    I am fuzzy on the second condition. Any help would be great. Thanks!

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: IF AND Statement help

    maybe like this

    Formula: copy to clipboard
    =IF(AND(A1="TEST",COUNTIF(B1:E1,"*S2*")>0),"Testing","")
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: IF AND Statement help

    hi rguss985, welcome to the forum. your eg may be a bit too vague. uploading a sample Excel file will enable us to help you better. to upload, press "Go Advanced" beside the "Post Quick Reply" button & click on the paperclip icon
    ideally, it should contain your desired results

    is TEST a Named cell or do you want to find if A1 has the text "TEST"? if it's the former, maybe:
    =IF(AND(A1=TEST,COUNTIF(B1:H1,"*s2*")=COLUMNS(B1:H1)),"Testing","")
    or if it's the latter, then:
    =IF(AND(A1="Test",COUNTIF(B1:H1,"*s2*")=COLUMNS(B1:H1)),"Testing","")

    also not sure if the counts in B1:H1 should just contain 1 or all cells must contain S2

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    01-07-2013
    Location
    Indianapolis, IN
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: IF AND Statement help

    That worked. Thank you SO SO muh!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1