+ Reply to Thread
Results 1 to 11 of 11

Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

  1. #1
    Registered User
    Join Date
    10-30-2019
    Location
    Burlingame, Ca
    MS-Off Ver
    MS Office Pro Plus 2016 & MS Office 365 ProPlus
    Posts
    23

    Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    Been scratching my head for the last week and can't figure out my solution.
    I have a workbook with 2 sheets. Sheet 1 is Training Data. It lists documents, document versions, effective dates, pages and users.
    In Sheet 2, I want to collect count data so I can provide charts, etc.
    I have created a drop down with unique Doc_ID values from column A of sheet 1 and added a value of "All". If "All" is selected, I'd like all the formulas to perform the calculations below for all document versions.
    Formula in column G UNIQUE(Sheet1!A2:A810,FALSE) I added "All" and hid it. I also created a drop-down in A2 via Data Validation.
    I'm looking for 3 formulas for Sheet 2:

    1. Cell C2- Count of revisions. Here, I want to count the number of times a doc has been revised, (Doc_Ver) per Doc_ID. Example: There are 5 rows for SOP-02659, version 1.0. This would be a count of "1". Version 2.0 has 6 rows. This will be count # 2 and so on. There are many doc_ids with many versions. This is where the helper cell A2 comes in play. I started with COUNTIF(A2:A88,F2) but when trying to incorporate a date SUMPRODUCT(--(YEAR($C$2:$C$88)=B2)) it doesn't work.

    2. Cell D2- Total Training Events- This is the count of how many unique users trained on each Doc_ID and Doc_Ver. Note: the users in column F are made up to protect their names. There are possible duplicate user names per doc_ID and Doc_Version, hence "unique".

    3. Cell E2- Total Training Time- This is a calculation of the total hours spent on training per Doc_ID and Doc_Ver. Each user spends 0.2 hours per page. I assume the training events per Doc_ID and Doc_Ver multiplied by Pages.

    Any help is appreciated
    Attached Files Attached Files
    Last edited by charliechaz; 08-10-2022 at 10:13 PM. Reason: Add attachment

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,779

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    Please fill in the results table with your expected results for at least the first three years. Do this twice: once for ONE Doc ID and once for ALL.

    Maybe this will get you started in C2:

    =MAXIFS(TableTrain8[Doc_Ver],TableTrain8[Doc_ID],$A$2,TableTrain8[Effective Date],">="&DATE($B2,1,1),TableTrain8[Effective Date],"<="&DATE($B2,12,31))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    I would use pivot table to solve this question.

    Since there a linked data in the file I can't show you.

    If you go for that option, add a new file without linked data and a smaller dataset.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not told us about this. You are required to do so.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until you provide a link telling us where else you have posted this query.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Registered User
    Join Date
    10-30-2019
    Location
    Burlingame, Ca
    MS-Off Ver
    MS Office Pro Plus 2016 & MS Office 365 ProPlus
    Posts
    23

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    Thanks AliGW. I added an 'Expected Results' worksheet to the file, now titled 'Count Help With Expected Results' (this one does not have linked data).

    As you suggested, I populated the results manually. The tricky one was 'Total Training Time'. Here I calculated by filtering Sheet1 by Doc_ID, then by 'Effective Date'. I then SUM all the 'Pages' values and multiplied by the count of filtered records, then divided by 60.
    Thanks for your help
    Attached Files Attached Files

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    Administrative Note:

    Sorry, but your post does not comply with Rule #6 of our Forum RULES:

    Please do not ignore requests by Administrators, Moderators and senior forum members regarding forum rules.

    If you are unclear about the request or instruction, then send a private message to them asking for clarification.

    All Participants:

    Please do not post a reply in a thread where a Moderator or Administrator has requested an action that has not yet been complied with (e.g. title change, code tags requested, etc.). Thanks.

    No further help to be offered until OP complies with this request.

  7. #7
    Registered User
    Join Date
    10-30-2019
    Location
    Burlingame, Ca
    MS-Off Ver
    MS Office Pro Plus 2016 & MS Office 365 ProPlus
    Posts
    23

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    Apologies alansidman. I was desperate to solve my query and could not post here due to fatal errors I received last night. I figured it was due to your migration to a faster server. I did post to another forum but as I could not upload the excel file, I waited until I could do so here, my preferred forum.
    Won't happen again!

  8. #8
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    Please comply with my request to post your crosspost in compliance with the forum rules. Failure to do so may result in a short time out and anyone from responding to this post. PLease comply with the few rules we have that you agreed to abide by when you joined this forum. If you are unfamiliar, please re-read those rules.

  9. #9
    Registered User
    Join Date
    10-30-2019
    Location
    Burlingame, Ca
    MS-Off Ver
    MS Office Pro Plus 2016 & MS Office 365 ProPlus
    Posts
    23

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???


  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    With pivot table and calculated field.

    See the attached file.

  11. #11
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Help with SUMPRODUCT, COUNTIF, COUNTIFS, INDEX, MATCH- WHAT TO CHOOSE???

    Hi,
    with helpers in H-O:

    C2
    Please Login or Register  to view this content.
    D2
    Please Login or Register  to view this content.
    E2
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Limor_OP; 08-12-2022 at 06:58 AM.

+ 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 if and count if formulas together
    By ACrossley1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-09-2020, 07:51 PM
  2. COUNT IF formulas
    By bgattens in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2013, 11:59 AM
  3. Replies: 5
    Last Post: 01-31-2013, 12:55 PM
  4. Count Formulas
    By Martin9 in forum Excel General
    Replies: 3
    Last Post: 08-03-2012, 07:19 AM
  5. Count (But not formulas)
    By djfatboyfats in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2008, 10:15 PM
  6. Using count formulas with '<='
    By Drummy in forum Excel General
    Replies: 2
    Last Post: 06-05-2006, 03:40 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