+ Reply to Thread
Results 1 to 4 of 4

Subtotal cells in column that ="value" if another column in same row ="value"

  1. #1
    Registered User
    Join Date
    05-29-2013
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Subtotal cells in column that ="value" if another column in same row ="value"

    My first question ever!

    I've created a sheet with former-employee information. Each row a different employee. I need to use info from only two columns. Column J lists "term period" which is the month that an employee was terminated (Period 1, Period 2, etc.). Column L lists the "Supervisor" which is the direct supervisor of the former employee (Allen, Linda, Matt, etc.) I've filtered out many types of termination reasons that do not affect our turnover rate.

    Now I'm in desperate need of a function to count the SUBTOTAL of employees "Allen" terminated in "Period 1", to show trend of terminations done per period by each manager.

    I have this in place
    =COUNTIFS(J:J,"Period 1",L:L,"Allen")
    but it counts the hidden cells as well, and I'm trying to avoid that.

    Please help :/

    -E

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

    Re: Subtotal cells in column that ="value" if another column in same row ="value"

    Maybe something like this...

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(J5,ROW(J5:J100)-ROW(J5),0)),--(J5:J100="Period 1"),--(L5:L100="Allen"))

    Adjust the ranges to suit.

    You should avoid using entire columns as range references with the SUMPRODUCT function. Use smaller specific ranges.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-29-2013
    Location
    Texas, USA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Subtotal cells in column that ="value" if another column in same row ="value"

    Thank YOOOOOOU!

    Wasn't working at first. But after some tracing, I realized that the subtotal function does not like errors in the search array.
    So I had to go all IF(ISNA(function)),"",(function) on them.

    Thank you again so much.

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

    Re: Subtotal cells in column that ="value" if another column in same row ="value"

    You're welcome. Thanks for the feedback!

+ 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