+ Reply to Thread
Results 1 to 4 of 4

[SHORT Question] How to count only if both columns have values

  1. #1
    Registered User
    Join Date
    04-09-2016
    Location
    antigua
    MS-Off Ver
    2007
    Posts
    2

    Thumbs up [SHORT Question] How to count only if both columns have values

    0 1
    2 1
    5 0
    1 0
    1 4
    0 0


    Ok so look at the data set above , two columns with numbers in them. I want to count the times a number greater then 0 appears in both columns.
    So for above I want the answer to be a count of 2 because only twice does a number greater then 0 appear in both column- in this case 2nd row with (2,1) and the 5th row
    with (1,4). The other occasions there is a 0 in at least one of the columns so it doesn't count them.

    Any help would be greatly appreciated thanks!

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

    Re: [SHORT Question] How to count only if both columns have values

    Try this:

    =COUNTIFS(A:A,">0",B:B,">0")

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-09-2016
    Location
    antigua
    MS-Off Ver
    2007
    Posts
    2

    Re: [SHORT Question] How to count only if both columns have values

    Works perfectly exactly what I wanted. Cheers!

  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,724

    Re: [SHORT Question] How to count only if both columns have values

    Glad to hear it - thanks for the rep.

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

    Pete

+ 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. Replies: 2
    Last Post: 04-15-2015, 04:32 PM
  2. [SOLVED] Find count of Unique or Duplicate Values based on Concatenated values in 2 columns
    By bdicarlo1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2014, 12:42 AM
  3. Short Averaging Time Question
    By donofri7 in forum Excel General
    Replies: 6
    Last Post: 01-21-2011, 12:04 PM
  4. Replies: 1
    Last Post: 09-13-2010, 02:07 AM
  5. Short code question, macro stops
    By ExcelStarter in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-26-2009, 05:48 PM
  6. [SOLVED] [OT] SAP - short question
    By Snake Plissken in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-21-2005, 06:20 AM
  7. Short question:Background picture in excel
    By FloggingDolphin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2005, 06:05 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