+ Reply to Thread
Results 1 to 2 of 2

Help with Formula - multiple criteria

  1. #1
    Registered User
    Join Date
    12-06-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    14

    Help with Formula - multiple criteria

    IF columns A:B contain "P" AND columns C:D contain "P" AND column E contains "P"(in the cell that the formula is written) then it returns "P" if either of those column groups don't contain a P then it returns an "F"

    This is what I have tried, but it's not working: =IF(COUNTIFS(A2:B2,"P", C2:D2, "P", E2, "P"), "P", "I")

    I've probably made a massive fool of myself and my formula is nowhere near working.

    I look forward to some expert help.

    Thanks very much!

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

    Re: Help with Formula - multiple criteria

    Ben Bennett,

    Welcome to the forum!
    The problem is that each criteria_range must be the same size. Because E2 is only 1 cell where the other ranges A2:B2 and C2:D2 are each 2 cells, the Countifs function returns an error.
    So using a slight tweak, this should work for you:
    Please Login or Register  to view this content.

    As a side note, the formula you posted shows a return of "I" for a False output, but in your description you state that it should return an "F" for a False output. This has me a bit confused, but I went with the "I" as shown in the formula.
    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