Consulting

Results 1 to 3 of 3

Thread: count if help

  1. #1

    count if help

    I currently have the following formula
    =COUNTIF(Activations!P:P,I9)

    This takes what is in I9 (mailing) and adds how many times that word shows up in column P on my activations sheet.

    I want to add something to that

    I want it to do the following:
    Look at I9 and count how many times it show up in column P but only if column A matches "joe"

    what do I need to change/add to make that work? Thank You!

  2. #2
    VBAX Tutor gnod's Avatar
    Joined
    Apr 2006
    Posts
    257
    Location
    [VBA]=IF(A9="joe",COUNTIF(Activations!P:P,I9),0)[/VBA]

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Depends where Joe lives; either
    =SUMPRODUCT(--($A$1:$A$2000="Joe"),--(Activations!$P$1:$P$2000=$I$9))
    or
    =SUMPRODUCT(--(Activations!$A$1:$A$2000="Joe"),--(Activations!$P$1:$P$2000=$I$9))
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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