+ Reply to Thread
Results 1 to 8 of 8

Countifs with index match

  1. #1
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Countifs with index match

    Hi Struggling to even think about the logic for this one.

    I have two worksheets:

    Worksheet 1 named: “Matter Spend ALL”
    Worksheet 2 named: “RM Report Data”

    There is one unique field that links the two worksheets named: “Short Matter Name” which sits in column B on both worksheets. When I say unique, the matter names will be the same (same spelling and same format) in both worksheets but worksheet 2 may contain a number of duplicate entries.

    I need to find a formula that does the following:
    1) For worksheet 1 it finds each “Short Matter Name” where the matter is “Open”. The open status is in column “K” in Worksheet 1 (“Matter Spend ALL”).
    2) Uses the outputs from 1) to count the matters in Worksheet 2 (“RM Report Data”) where the following is also true:
    a. The Practice Group (column Q in Worksheet 2("RM Report Data") matches the practice group in A2 to A8 in the table below.
    b. The PO number (column M in worksheet 2 (“RM Report Data”)) has an irregularity i.e. it either is states “awaited”, “tbc”, “TBC”, “?” or is blank.
    c. The formulae should then sum the volume of irregularities found for each Practice Group in column B in the table below.

    I have created formulas below in B2 and C2 of the table below. The ranking formulae works but the formulae in column B produces the wrong results. I think this is because I need an index/match in there somewhere.

    Unfortunately, a pivot table is not a solution to this nor is power BI as my stakeholders don’t have this.

    Any help would be greatly appreciated.

    P
    SNIPJAN2019.PNG

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,364

    Re: Countifs with index match

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Countifs with index match

    I have uploaded a sample file as requested. The column numbers in my original post have therefore changed but I have included a detailed explanation of the desired result in the attached. Thanks for your help so far.

    Paul
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Countifs with index match

    Hi All / Administrator - I am assuming there is no solution to this - should I just close the post or is there any further information I could provide to help?

    Regards

    P

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: Countifs with index match

    To me the explanation from post #1 seems difficult to understand.
    Could you please adapt it in function of the sheets in the wbk you uploaded? (For example "Matter Spend All is the second sheet in your example and the status is in col B ,not K as decribed
    ( hope it's not too much trouble)

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: Countifs with index match

    And BTW, if you don't get an answer within say 24 hrs, do not hesitate to "bump" your thread.

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Countifs with index match

    Please try at Ranking New D2 Press Ctrl+Shift+Enter and drag down

    =SUM(COUNTIFS('RM Report Data'!C:C,A2,'RM Report Data'!B:B,{"*",0,""},'RM Report Data'!A:A,IF(('Matter Spend All'!$C$2:$C$16=A2)*('Matter Spend All'!$B$2:$B$16="Open"),'Matter Spend All'!$A$2:$A$16)))

    Business Spend>SA Count 1 because
    Matter Spend All row#9 Gringot 67543 > Open and
    RM Report Data row#10 Gringot 67543 has no PO number.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    03-01-2016
    Location
    England
    MS-Off Ver
    2016
    Posts
    27

    Re: Countifs with index match

    Bo_Ry - Your solution works like a treat - thank you so much and apologies for the Gringot miscalculation!.

    Thank you so much

    P

+ 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. using countifs with index and match
    By cvandy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-23-2018, 02:43 AM
  2. INDEX, MATCH and COUNTIFS
    By 1953CAG in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-18-2017, 04:57 AM
  3. Countifs (and index match in it) for a horizontal payroll data
    By muraterguden in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-26-2017, 01:46 PM
  4. Using INDEX, MATCH, and COUNTIFS to dissect survey results
    By gramdaman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-21-2017, 04:12 PM
  5. Countifs, index, match help wanted
    By DawitX in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-18-2015, 12:45 PM
  6. Countifs, Index and match is not working together
    By vinod2802 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-03-2015, 08:06 AM
  7. Countifs Index Match
    By Keelin in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-16-2014, 08:38 AM

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