+ Reply to Thread
Results 1 to 3 of 3

COUNTIF Modification

  1. #1
    Registered User
    Join Date
    10-10-2007
    Posts
    18

    COUNTIF Modification

    Hey all,

    I'm running into a problem with a certain COUNTIF statement. I have to count the number of agents based on the following criteria:

    -What level of agent they are (L1,L2,L3,L4)
    -How long they've been tenured (ranges of days: 0-60, 61-90, 91-120, 121+)

    So in otherwords, I need to count the L1 agents between 0-60, 61-90, etc. along with the rest of the levels...

    I've tried the following:

    =COUNTIF(Roster!F:F,">1")-COUNTIF(Roster!F:F,">60")

    Which provides me the correct number of agents, but does not take into account the fact that certain agents might be counted incorrectly due to non promotion after a certain date range.

    Is there a way to fix this using the above criteria? Thanks.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Probably best to try Sumproduct() which allows you to count based on multiple criteria:

    =Sumproduct(--(Roster!$A$2:$A$1000="L1"),--(Roster!$F$2:$F$1000>1),--(Roster!$F$2:$F$1000<=60))

    where A2:A1000 contains the agent levels...adjust all ranges to suit.

    Note: Sumproduct doesn't allow full ranges like A:A (unless you are using 2007)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    10-10-2007
    Posts
    18
    Ah ha... I was using sumproduct incorrectly then; I tried messing with it eariler and it didn't work out, I see why now.

    THanks a bunch!

+ 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