+ Reply to Thread
Results 1 to 13 of 13

Count according to date & exclude empty cells

  1. #1
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    Count according to date & exclude empty cells

    Hi,

    I have Dates in column A (from 1st to 31th January), and values in column B, which corresponds to a day value.

    I want to have number of rows in column B that are not empty according to January date. I need this for all months, and all dates are in column A.

    Please help, this is struggling me for quite a while !!


    See attached sample !
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: Count according to date & exclude empty cells

    I dont understand why dont you applying Count formula to Col B
    Attached Files Attached Files
    Don`t care, take care...

    Regards,
    Mangesh

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Count according to date & exclude empty cells

    =COUNTIFS($A$1:$A$31,">="&DATE(2015,1,1),$A$1:$A$31,"<"&DATE(2015,2,1),$B$1:$B$31,"<>"&"")
    Please Login or Register  to view this content.
    Try this formula
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Count according to date & exclude empty cells

    But why not =COUNTA(B:B)



    Am I missing something?
    Cheers!
    Deep Dave

  5. #5
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Count according to date & exclude empty cells

    OR,

    =COUNTIFS(A:A,">"&EOMONTH(D3,-1),A:A,"<="&EOMONTH(D3,0),B:B,"<>"&"")

    See the attached file.
    Attached Files Attached Files
    Last edited by cbatrody; 10-05-2015 at 08:30 AM.

  6. #6
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    Re: Count according to date & exclude empty cells

    nflsales,

    Great formula, but what about december, It doesn't work ?

  7. #7
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Re: Count according to date & exclude empty cells

    If you want to count as per month then here the formula
    Ctrl+Shift+Enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mangesh.mehendale; 10-05-2015 at 08:50 AM.

  8. #8
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Count according to date & exclude empty cells

    Try with this for December
    =COUNTIFS($A$1:$A$31,">="&DATE(2015,12,1),$A$1:$A$31,"<"&DATE(2016,1,1),$B$1:$B$31,"<>"&"")

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count according to date & exclude empty cells

    Try this...

    Use cells to hold the date criteria.

    D1 = the 1st of the month date for the month to count

    Data Range
    A
    B
    C
    D
    E
    1
    1/1/2015
    1
    1/1/2015
    30
    2
    1/2/2015
    33112
    ------
    ------
    ------
    3
    1/3/2015
    1213
    4
    1/4/2015
    11
    5
    1/5/2015
    6
    1/6/2015
    1234243
    7
    1/7/2015
    345
    8
    1/8/2015
    4343
    9
    1/9/2015
    4345
    10
    1/10/2015
    939384


    This formula entered in E1:

    =COUNTIFS(A:A,">="&D1,A:A,"<="&EOMONTH(D1,0),B:B,"<>")

    You may have to replace the commas with semi-colons.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  10. #10
    Forum Contributor
    Join Date
    02-09-2014
    Location
    Kamnik, Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    693

    Re: Count according to date & exclude empty cells

    Wow, all these options and all of them work !

    Thanks guys, you helped me a lot, I used solution from cbatrody, It suits my needs

    nflsales, your solution works for December too, but my worksheet is designed differently so I can't use It !

    Big thumbs for all of you, this formula drived me nuts !

  11. #11
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Count according to date & exclude empty cells

    You are welcome

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count according to date & exclude empty cells

    You're welcome. We appreciate the feedback!

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count according to date & exclude empty cells

    Tip...

    I noticed in a couple of the replies the use of this expression for the "is not blank" criteria:

    "<>"&""

    That can be reduced to:

    "<>"

+ 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] Exclude empty cells from a calculation
    By Andrew87.. in forum Excel General
    Replies: 9
    Last Post: 01-03-2015, 11:28 AM
  2. VBA modification to exclude empty cells, just need help implementing!!
    By cronerd in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-09-2013, 12:32 PM
  3. Excel 2007 : exclude empty cells
    By maniac099 in forum Excel General
    Replies: 7
    Last Post: 06-17-2012, 10:53 AM
  4. Exclude empty cells
    By klund in forum Excel General
    Replies: 10
    Last Post: 05-05-2009, 06:42 AM
  5. Replies: 7
    Last Post: 01-27-2009, 10:42 PM
  6. How do I exclude empty cells from being printed?
    By pox in forum Excel General
    Replies: 1
    Last Post: 08-13-2005, 07:05 AM
  7. How to exclude cells that are empty?
    By aijihz in forum Excel General
    Replies: 1
    Last Post: 03-30-2005, 02:06 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