+ Reply to Thread
Results 1 to 8 of 8

Index and Multiple Match or ifCountIf formula

  1. #1
    Registered User
    Join Date
    06-08-2023
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    7

    Index and Multiple Match or ifCountIf formula

    Good evening all. Let me see if I can explain what I am trying to do here. I am really not sure of even the best way to set this up. Here's what I have though.

    A report of pass/fails from inspections on jobs over the course of 2021-2023 (It constantly expands)
    What I have done so far is take that desired data from the report (sheet 1 "STP Measure Fail w Chris" and transfer totals onto the "All Offices" page using CountIf

    PART 1:
    This now reflects how many of each fail there are for each employee etc. Great, other than this is data from multiple years. So I broke them down into different sheets by office using:
    =COUNTIFS('STP Measure Fail w Chris'!$I$14:$I$25999,"Bill-Fail", 'STP Measure Fail w Chris'!$G$14:$G$25999,"Raul Alvarez", 'STP Measure Fail w Chris'!$E$14:$E$25999, ">=1/1/2023")
    Hoping it would now only reflect 2023 but it's showing 0 instead of counting just the 2023 fails.

    PART 2.
    For each of the fails (despite the type i.e. Bill Fail, CIP Corrected, Feasible Measure Fail, Hazard Fail, Measure-Fail I am trying to bring over the comments for each of them and I have zero clue on how to set this up. One beacuse I don't know if Index and Match can return strings of text or CountIf for that matter. I have tried a few things but I just get errors.
    The Comments I am seeking out are on Sheet "STP Measure Fail w Chris" and they are in Column J "CIP Notes"

    So the offices would then reflect there total fails for each associated fail column AS WELL AS with each fail the notes about them. I think part of what I struggle with is other than random dates there is nothing else to match them with since they are random. For Instance, emp a may have 4 bill fails and 1 hazard fail. How can I match multiple of the same thing with different notes...if that makes sense.
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Index and Multiple Match or ifCountIf formula

    well for part 1, there is only one bill fail for Raul and that is for 2022. Secondly your "dates" in column E are text and not dates. Highlight the column of dates and go to the data tab at the top, then text to columns, leave it on delimited and hit finish and they should convert to numbers. Still looking into part 2.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Index and Multiple Match or ifCountIf formula

    to bring the comment notes over (Part 2) I would think a vlookup, index/match or xlookup would work but you would need to have something that matches in order to pull it over, for example something that would specifically indicate the row for the match like maybe a distinct code, maybe the code like MHR12 along with the data and the assigned installer because you have more than one MHR12 code and these formulas will pull the first one they encounter even if the cell is blank.

  4. #4
    Registered User
    Join Date
    06-08-2023
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    7

    Re: Index and Multiple Match or ifCountIf formula

    Thank you for the reply. I changed the date column as you stated, recopied the formula but now it gets an error. I checked my regional settings and it's on , seperated list. So I am not sure. Unless it's becuase of the date change.

    COUNTIFS('STP Measure Fail w Chris'!$I$14:$I$25999,"Bill-Fail", 'STP Measure Fail w Chris'!$G$14:$G$25999,"Raul Alvarez",('STP Measure Fail w Chris'!$E$14:$E$25999, ">=1/1/2023"))

    "There is a problem with this formula. Not typing the right formula.....etc

  5. #5
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Index and Multiple Match or ifCountIf formula

    could you upload a new workbook with the "corrected" formula and which cells have the formula and also put somewhere expected results?
    for example, in the workbook for the Bakersfield tab you have in C3, D3, E3 etc the same formula looking for bill-fail which makes it a bit confusing where the formula is and what the correct results you want, as I noted in post #2, the only bill fail for Raul is for the year 2022 so your formula even if corrected will still return 0.

    here is how I'd change the countif formula ...
    =COUNTIFS('STP Measure Fail w Chris'!$I$14:$I$25999,D$2, 'STP Measure Fail w Chris'!$G$14:$G$25999,$A3, 'STP Measure Fail w Chris'!$E$14:$E$25999, ">=1/1/2023")
    you can drag that down and right until col K where you have to change it to...
    =COUNTIFS('STP Measure Fail w Chris'!$I$14:$I$25999,"", 'STP Measure Fail w Chris'!$G$14:$G$25999,$A3, 'STP Measure Fail w Chris'!$E$14:$E$25999, ">=1/1/2023")

    I find using the cell references is easier than continually putting different names into the formula.

  6. #6
    Registered User
    Join Date
    06-08-2023
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    7

    Re: Index and Multiple Match or ifCountIf formula

    Ok not a problem. I did the ones you wrote above too and it's still given me the stiff arm haha. Here is a work book. Sorry it's taking so long to get back. I am traveling and it's not the easiest with out my home office tools. I did copy and paste your suggestions within this and same result: "0".

    I should be able to work on that "part two" portion when I get home this weekend. I think I am going to create a drop down category that will reference these fails as "plumbing, electrical, etc. I don't really need the comments as much as I do a short answer of what was wrong. I can then find the comments. I think. This one has been rough to figure out in my head what makes sense and how to set it up. Unfortunately this is a report that is given to me and I can't change that format. But, without tons of manual effort I am essentially wanting to copy/paste this into a workbook and have it figure out the year to dates, the quantities for each person, and WHAT they are, with notes if possible.
    Attached Files Attached Files

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Index and Multiple Match or ifCountIf formula

    One of the problems you still haven't addressed is that all your "dates" in col E of the STP measures tab is that all of those dates are actually text. I mentioned in post #2 how to correct them.
    Highlight the column of dates and go to the data tab at the top, then text to columns and hit finish and they should convert to numbers.
    The way you can tell that they are not numbers (which are what dates are) is by putting a formula in an empty cell like =ISNUMBER(E20950) and if it returns FALSE then they are text. So converting them to numbers should make your formulas return something. See if this solves your issue.

  8. #8
    Registered User
    Join Date
    06-08-2023
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    7

    Re: Index and Multiple Match or ifCountIf formula

    That did work. I think what happend is I had two workbooks (an actual and a template) I made the change in one but not the other but had the formula in the opposite but not the other. I should have time later to work out part 1. That should be pretty straight forward. Thank you for the help once again, and I always love learing something new. That reference formula is wayyyy better.

+ 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. [SOLVED] Need Excel formula to use INDEX and MATCH with multiple criteria's over multiple ranges.?
    By mchilapur in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-22-2017, 08:56 AM
  2. Replies: 5
    Last Post: 10-16-2016, 02:33 AM
  3. Index formula with multiple match criteria (inc min)
    By Aussibuilder50000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-26-2016, 06:14 AM
  4. [SOLVED] Index & Multiple match Formula not quite right
    By coach.32 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-26-2014, 08:58 PM
  5. Replies: 2
    Last Post: 09-27-2014, 04:34 PM
  6. Excel 2007 : Index, Match, Large Formula: Multiple Criteria, Multiple Ranges
    By SimpleJack in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-19-2013, 08:54 AM
  7. multiple match/index formula
    By anguyen27 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-17-2012, 03:49 PM

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