+ Reply to Thread
Results 1 to 4 of 4

COUNTIFS not working for 2 values, but PIVOT is working fine

  1. #1
    Forum Contributor
    Join Date
    05-10-2019
    Location
    Penang, Malaysia
    MS-Off Ver
    2016
    Posts
    262

    COUNTIFS not working for 2 values, but PIVOT is working fine

    Hi All,
    COUNTIFS not working for 2 values (7 Courses & 8 Dept.). Need to count each employee assigned to what course & from which dept. The marking is by dates.
    Nevertheless, PIVOT table & chart is working fine. I am trying to avoid PIVOT table if possible


    Attached the sample file.

    Thank-You very much!
    Attached Files Attached Files

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: COUNTIFS not working for 2 values, but PIVOT is working fine

    Try

    d99=sumproduct(($d$4:$d$96=d$98)*($e$3:$k$3=$c99)*('2020'!$e$4:$k$96<>""))

    copy across

    OR

    =COUNTIFS(INDEX($E$4:$K$96,,MATCH($C99,$E$3:$K$3,0)),"<>""",$D$4:$D$96,D$98)
    Last edited by shukla.ankur281190; 12-04-2019 at 04:52 AM.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Contributor
    Join Date
    05-10-2019
    Location
    Penang, Malaysia
    MS-Off Ver
    2016
    Posts
    262

    Re: COUNTIFS not working for 2 values, but PIVOT is working fine

    Hi shukla.ankur281190,

    this perfectly works:
    =sumproduct(($d$4:$d$96=d$98)*($e$3:$k$3=$c99)*('2020'!$e$4:$k$96<>""))
    this partly works: (drag to the followings rows & columns but the value same as the top
    =COUNTIFS(INDEX($E$4:$K$96,,MATCH($C99,$E$3:$K$3,0)),"<>""",$D$4:$D$96,D$98)
    you think could fix for COUNTIFS?

    Thank-You very much!

  4. #4
    Forum Contributor
    Join Date
    05-10-2019
    Location
    Penang, Malaysia
    MS-Off Ver
    2016
    Posts
    262

    Re: COUNTIFS not working for 2 values, but PIVOT is working fine

    Hi shukla.ankur281190,

    I am looking at your COUNTIFS, still cant detect why the values cannot be copied to the bottom.
    I will just leave this thread open & added reputation to you..

    Thank-You very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 06-06-2019, 09:03 PM
  2. Code is working fine in debug step through but won't run - help please
    By Albert Toet in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2019, 05:42 AM
  3. If formula not working fine
    By vjharry in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-10-2014, 08:36 AM
  4. [SOLVED] countifs working on extended ranges and different sheets not working
    By etaf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2013, 02:23 PM
  5. Sheet activation working fine for me, but not for others?
    By seed in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-25-2013, 04:20 PM
  6. [SOLVED] Two VBA Functions working fine with Win XP but not working with Win 7
    By LoveCandle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-01-2013, 04:01 PM
  7. Replies: 2
    Last Post: 05-24-2013, 09:32 AM

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