+ Reply to Thread
Results 1 to 5 of 5

Count number of cells in column per month

  1. #1
    Registered User
    Join Date
    12-22-2013
    Location
    united states
    MS-Off Ver
    Excel 2013
    Posts
    64

    Count number of cells in column per month

    Hey guys,

    I would like to count the number of cells that contains a date in each month.

    I have attached my workbook here: Book2.xlsx
    Last edited by lamdl; 01-09-2014 at 05:52 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,703

    Re: Count number of cells in column per month

    Use the sumproduct as shown in attached.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    12-22-2013
    Location
    united states
    MS-Off Ver
    Excel 2013
    Posts
    64

    Re: Count number of cells in column per month

    Thanks a lot! that worked.

    I would also like to average the values in column C associated with each month. So each month would have an average associated with it.

    workbook BOOK 5.xlsx

    Can you help me out with this as well?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Count number of cells in column per month

    Try this in F2, copied down...
    =SUMPRODUCT(--(B$2:B$132<>""),--(MONTH(B$2:B$132)=D2)*($C$2:$C$132))/E2
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    12-22-2013
    Location
    united states
    MS-Off Ver
    Excel 2013
    Posts
    64

    Re: Count number of cells in column per month

    Quote Originally Posted by FDibbins View Post
    Try this in F2, copied down...
    =SUMPRODUCT(--(B$2:B$132<>""),--(MONTH(B$2:B$132)=D2)*($C$2:$C$132))/E2
    That seems to work. However, if there is a formula at the bottom of column B and C that yield a "", the formula breaks.

    new workbook: BOOK 6.xlsx

    B/C:133 have a formula =""

    I will need the formula in column E to work if there is a formula that yields a "" in column B and C.

    I really appreciate your help!
    Last edited by lamdl; 01-10-2014 at 04:28 PM.

+ 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: 12-17-2013, 06:30 AM
  2. Count number of networkdays for each month in a multi month period
    By dreddster in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-10-2013, 11:12 AM
  3. [SOLVED] Count the number cells > 0 for each day of the month.
    By Chanley24 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2013, 12:37 AM
  4. Replies: 9
    Last Post: 06-08-2012, 06:22 PM
  5. Replies: 9
    Last Post: 03-15-2006, 03:25 PM

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