+ Reply to Thread
Results 1 to 7 of 7

Need help with Countif function

  1. #1
    Registered User
    Join Date
    12-25-2021
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Home 2021
    Posts
    3

    Smile Need help with Countif function

    Hello everyone! Merry Christmas!

    I am a complete newbie and would like to ask for help with my worksheet. I am trying to count all positions according to the shift (days - tw, evenings - tw, or in office). I am able to get the correct countif function when all the data are arranged vertically, however, mine has data in multiple columns and i cant figure out how i can do the countif with multiple parameters and multiple columns. The sample data attached has the explanation on what summary i would like to have. Really appreciate if you could help me with my file.

    Thank you so much in advance!
    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 2403
    Posts
    44,114

    Re: Need help with Countif function

    Change the spelling in P1 to match the rest. In O2, copied across and down:

    =SUMPRODUCT(($A$3:$K$23=$N2)*($B$3:$L$23=O$1))

    Please try and explain what the lower table is doing??!!
    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
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,114

    Re: Need help with Countif function

    O17 copied across and dnown to P18:

    =SUMPRODUCT(($D$3:$L$23=$N17)*(ISNUMBER(SEARCH(O$16,$D$3:$L$23))))

    change spelling in P16.

    How is Excel supposed to know whether VL, SL, etc, is a day event or an evening event??
    Attached Files Attached Files

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

    Re: Need help with Countif function

    If you change them to VL-Evenings, etc, etc, then it's easy...

  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 2403
    Posts
    44,114

    Re: Need help with Countif function

    Forget the last two posts. See formulae in sheet. Different shading = different formulae, all based on SUMPRODUCT as previously.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-25-2021
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Home 2021
    Posts
    3

    Re: Need help with Countif function

    Quote Originally Posted by Glenn Kennedy View Post
    Forget the last two posts. See formulae in sheet. Different shading = different formulae, all based on SUMPRODUCT as previously.
    Thank you so much! Sorry I wasnt able to see your earlier messages, but you still figured it ALL out! This is my first time posting by the way. and I am so glad that I found this site.

    You all ROCK!

  7. #7
    Registered User
    Join Date
    12-25-2021
    Location
    Winnipeg, Manitoba
    MS-Off Ver
    Home 2021
    Posts
    3

    Re: Need help with Countif function

    Quote Originally Posted by Glenn Kennedy View Post
    If you change them to VL-Evenings, etc, etc, then it's easy...
    Yes, I'll have to change this later as well. I was just thinking it will be redundant so i will try to figure it out myself since you basically solved my main problem. Thanks again!

+ 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 Function to work similarly to Sumif Function
    By JMC1927 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2019, 04:10 PM
  2. Adding a COUNTIF function to an existing IF AND COUNTIF Formula...
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2018, 10:09 AM
  3. How do i combine a vlookup function with a countif function?
    By charris58 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-08-2016, 06:15 PM
  4. COUNTIF/COUNTIFS function + nested user-defined function
    By shamjamali in forum Excel General
    Replies: 1
    Last Post: 05-12-2015, 09:12 PM
  5. Replies: 9
    Last Post: 07-02-2012, 07:02 PM
  6. Using Countif Function with the Month & Year Function
    By laya1024 in forum Excel General
    Replies: 3
    Last Post: 02-03-2009, 07:52 PM
  7. [SOLVED] Embed a countif function in subtotal function?
    By Stuck at work in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2006, 11:20 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