+ Reply to Thread
Results 1 to 19 of 19

countif formula

  1. #1
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79

    Question countif formula

    Any help much appreciated.

    count E18 as 0.5 and K18 as 0.5 (if K18 is not blank) or count E18 as 1 and K18 as 0 (if K18 is blank)

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: countif formula

    I recommend uploading a small representative sample of your data along with the desired results (which you can enter manually) based on that data.

    To upload an Excel workbook, follow these steps:
    1) Click on "Go Advanced"
    2) Click on "Manage Attachments"
    3) Click on "Choose File"
    4) Choose your file and click on "Open"
    5) Click on "Upload"
    6) Click on "Close this window"

  3. #3
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79

    Re: countif formula

    Manage attachments doesn't seem to be working, when I click the paperclip the dropdown box is empty

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: countif formula

    Don't try to use the Paperclip icon, as it doesn't work on this forum.

    Use the procedure outlined in Post #2.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79
    Thank you it should be attached now
    Attached Files Attached Files
    Last edited by AliGW; 11-05-2018 at 11:33 AM.

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: countif formula

    Where are the desired results in the sample from post #5?

  7. #7
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79
    It should be in cell C8
    Last edited by AliGW; 11-05-2018 at 11:33 AM.

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: countif formula

    Cell C8 is blank.

    Post #2 asks for "the desired results (which you can enter manually) based on that data". You have not yet provided this.

  9. #9
    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,460

    Re: countif formula

    Max - please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    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.

  10. #10
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79

    Re: countif formula

    I was using my phone at the time apologies.

    I think I'm getting confused here

    If E18 is not empty, I18>0, if K18 is empty count 1 but if K18 is not empty count as 0.5 and add 0.5 again if P18>0

    These cell references are manual input, C8 should be a table total of these conditions

  11. #11
    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,460

    Re: countif formula

    You need to add expected outcomes manually to your workbook and post again.

  12. #12
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79

    Re: countif formula

    I feel like ive came to a dead end

    the desired outcome should be in C8 (a table total of the conditions stated) apologies for coming across simple minded
    Last edited by max8719; 11-05-2018 at 12:28 PM.

  13. #13
    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
    43,986

    Re: countif formula

    We know it should be in C8... but what is the NUMERICAL VALUE of the answer you expect to see???

    17, 156, 132, 555, 222 or what???!!!

    Calculate it manually and tell us....
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  14. #14
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79

    Re: countif formula

    ive attached it with desired outcome in column T, can this not be done in a formula and not creating another column for this calculation?

    Thanks for your support
    Attached Files Attached Files
    Last edited by max8719; 11-05-2018 at 01:00 PM.

  15. #15
    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
    43,986

    Re: countif formula

    Maybe this:

    =SUMPRODUCT(0.5*(($I$18:$I$35>0)*($K$18:$K$35<>"")))+SUMPRODUCT(($I$18:$I$35>0)*($K$18:$K$35=""))

    I say maybe as C8 says 4.5, whereas the sum of T is 5.5 (which this formula gives). See sheet.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79

    Re: countif formula

    Thanks its 5.5 because I missed out a condition which is A18:A134=A3, how do I adapt the sumproduct formula to include this please

  17. #17
    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
    43,986

    Re: countif formula

    One way:

    =SUMPRODUCT(0.5*(($I$18:$I$35>0)*($K$18:$K$35<>"")*($A$18:$A$35=$A$3)))+SUMPRODUCT(($I$18:$I$35>0)*($K$18:$K$35="")*($A$18:$A$35=$A$3))




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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    01-23-2016
    Location
    england
    MS-Off Ver
    2010
    Posts
    79

    Re: countif formula

    legend, rep heading your way, thanks

  19. #19
    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
    43,986

    Re: countif formula

    Cheers!! Any time.

+ 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] COUNTIF formula where part of the range reference needs to use the result of a formula
    By zookeepertx in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 11-09-2018, 05:39 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. [SOLVED] CountIf formula results in the formula itself being displayed.
    By NewKid in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-19-2017, 03:31 PM
  4. Assistance with CountIF formula and additional formula conditions
    By solios in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-18-2016, 01:46 PM
  5. Faster if/countif formula for flagging uniques - countif too slow
    By Speshul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2015, 01:44 PM
  6. [SOLVED] =Subtotal(countif,Range); Subtotal and countif in 1 formula [SOLVED]
    By thomas.mapua in forum Excel General
    Replies: 5
    Last Post: 01-06-2012, 11:33 AM
  7. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 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