+ Reply to Thread
Results 1 to 5 of 5

COUNTIFS OR COUNTIFS needs to work

  1. #1
    Registered User
    Join Date
    05-23-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2003
    Posts
    2

    COUNTIFS OR COUNTIFS needs to work

    Hello,

    Currently I need

    =COUNTIFS(B:B, "WA",D:D, "2006",A:A, "Bellingham")+COUNTIFS(B:B, "WA",D:D, "2006",A:A, "Anacortes ")

    to work. Basically It needs to recognize if it's from 2006 and this state and if it's either one of these two cities.

    I'm stuck and thought the above function would work, but it doesn't.

    Help would be be very much appreciated.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: COUNTIFS OR COUNTIFS needs to work

    Perhaps

    =SUMPRODUCT(COUNTIFS(B:B, "WA",D:D, "2006",A:A,{ "Bellingham","Anacortes "}))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,080

    Re: COUNTIFS OR COUNTIFS needs to work

    instead of "WA" or "2006" etc, use "=WA" and "=2006"...YES, INCLUDING the Quotation

  4. #4
    Registered User
    Join Date
    05-23-2013
    Location
    Salt Lake City, Utah
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: COUNTIFS OR COUNTIFS needs to work

    Thanks you guys!

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: COUNTIFS OR COUNTIFS needs to work

    If you're going to hardcode the criteria:


    =SUM(COUNTIFS(B:B,"WA",D:D,2006,A:A,{"Bellingham","Anacortes"}))

    If you use cells to hold the criteria:

    F2 = WA
    G2 = 2006
    H2 = Bellingham
    H3 = Anacortes

    =SUMPRODUCT(COUNTIFS(B:B,F2,D:D,G2,A:A,H2:H3))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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