+ Reply to Thread
Results 1 to 13 of 13

Countif with data validation

  1. #1
    Registered User
    Join Date
    12-11-2020
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013
    Posts
    37

    Countif with data validation

    Hello all, Happy new year.

    This one has proved to be quite the challenge for me:

    Opening the workbook attached, you will see 3 sheets, Grid model, Dates for month and Interruptions.


    The grid model contains all the values to be counted on a daily basis, the Dates for month is the data validation sheet for ('Interruptions' cell F1) which allows results on the interruption sheet change when a different date is picked form the drop down list.

    I want to replicate cell F1 in Cell O1 with a different count criteria such that whenever an instance occurs (EF, OC, IMB, EMG, etc...) it's counted as 1 value. The values in Cells O4 - V4 and below are all correct for the 1ST of December, however these are manually counted results and I would like a formula that could do this instantly and not just for 1 day but for the entire month.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Countif with data validation

    In O4, copied across and down:

    =COUNTIFS(INDEX('Grid model'!$C$2:$BY$769,,MATCH(Interruptions!$B4,'Grid model'!$C$1:$BY$1,0)),O$3,'Grid model'!$A$2:$A$769,Interruptions!$O$1)

    I only pasted the formula into the dark green cells. You can do the remainder, taking into account your totals rows. No adjustment of the formula is needed. It is just fiddly... so you can do it!!
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    12-11-2020
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013
    Posts
    37

    Re: Countif with data validation

    Alrght Glen! So this is very good, thank you. Unfortunately it does not work for all the cells, see R10 for example. It should work out to 24 hours but it doesn't count?

  4. #4
    Registered User
    Join Date
    12-11-2020
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013
    Posts
    37

    Re: Countif with data validation

    Also, it doesn't change with the dates as with the cell results in F - N

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Countif with data validation

    I can fix the date. I set it to copy O1, as you said... but if you want it to copy F1, that's easy.

    Why are you expecting 24 for EMG on 1st December???

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Countif with data validation

    I can see none at all. The values in row 11 have been manually added. Are they correct?

  7. #7
    Registered User
    Join Date
    12-11-2020
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013
    Posts
    37

    Re: Countif with data validation

    Row 11 has a link to another document that I broke, the values are mostly correct with some inconsistencies so please ignore them.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Countif with data validation

    The date in O1 now copies the date in F1. The date in F1 controls the formula. Is there an issue with R10???
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    12-11-2020
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013
    Posts
    37

    Re: Countif with data validation

    No issues in R10 Glen, its working perfectly now. Might I ask why you changed the grid model to tables? Would the formula not work otherwise?

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Countif with data validation

    I changed nothing!!

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It would also be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

  11. #11
    Registered User
    Join Date
    12-11-2020
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013
    Posts
    37

    Re: Countif with data validation

    Hello Glen, I've got another question please. If I wanted to do a summary of EF occurrences (Cell F4 for example) over the months duration, how is it done?

    The results appear in a drop down list on the spreadsheet and have the same cell value even after I select a new date so its a bit of a struggle getting a sum total.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,381

    Re: Countif with data validation

    This looks like a different query - you should start a new thread with a suitable title.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  13. #13
    Registered User
    Join Date
    12-11-2020
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    2013
    Posts
    37

    Re: Countif with data validation

    Alright I will, thank you

+ 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. Countif data validation
    By UltimateNeo in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-29-2019, 01:57 AM
  2. how does this COUNTIF formula work for Data Validation?
    By srush in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-30-2018, 07:25 AM
  3. [SOLVED] Nested COUNTIF / IF formula for data validation workaround
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-03-2017, 02:33 PM
  4. COUNTIF based on Data Validation dropdown choice
    By EPosejpal in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-13-2017, 03:44 PM
  5. [SOLVED] Data Validation with CountIF?
    By bmasella in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-18-2014, 06:07 PM
  6. Replies: 4
    Last Post: 12-16-2013, 06:09 AM
  7. Replies: 3
    Last Post: 10-18-2010, 11:09 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