+ Reply to Thread
Results 1 to 7 of 7

If Formula looking at a number of cells to return a statement

  1. #1
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Talking If Formula looking at a number of cells to return a statement

    Hi Everyone,

    Newbie here,

    I am trying to create an 'IF' formula that looks in specific cells to check that the data is equal to relevant characters in order to return 2 different statements. All Relevant cells would have to be specific in order to return the 'true statement'.

    I am trying this but to no joy.

    =IF(B6="Y"&B7="Y"&B8="Y"&B9="Y"&C8="Y"&D9="Y"&E8="Y"&E9="Y","Plan A","Plan B")

    All of the specific cells must be Y in order to return Plan A. If one of them is an N then Plan B should be returned.

    I hope someone can help!

    Thanks in advance

    Tyler

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: If Formula looking at a number of cells to return a statement

    Try
    =IF(AND(B6="Y",B7="Y",B8="Y",B9="Y",C8="Y",D9="Y",E8="Y",E9="Y"),"Plan A","Plan B")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: If Formula looking at a number of cells to return a statement

    Man you are a wizard! . Thanks

  4. #4
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: If Formula looking at a number of cells to return a statement

    Now what about if I wanted to apply an 'or' argument?
    =IF(AND(B6="Y",AND OR B7="Y",AND OR B8="Y", AND OR B9="Y",C8="Y",D9="Y",E8="Y",E9="Y"),"Plan A","Plan B")

    Thanks

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: If Formula looking at a number of cells to return a statement

    I presume you are looking for one or more Y's in Cell B6,B7,B8,B9 and Y's in all the rest. Hence,

    =IF(AND(OR(B6="Y",,B7="Y",B8="Y",B9="Y"),C8="Y",D9="Y",E8="Y",E9="Y"),"Plan A","Plan B")

  6. #6
    Registered User
    Join Date
    08-22-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: If Formula looking at a number of cells to return a statement

    Yes you are correct! Apologies I am new to Excel and have only just started with IF formula and Vllokups etc so sorry for the basic questions.

    I now see that arguments need to be seperated by open and closed comma's which makes sense. Thaks you so much for your answers!

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: If Formula looking at a number of cells to return a statement

    Alternate formula with CountIf():
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

+ 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