+ Reply to Thread
Results 1 to 6 of 6

Count number of cells in column per month, ignore blank cells

  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, ignore blank cells

    Hey there,

    I have this formula which is counting the number of cells in a column that fall within each calender month.

    However, if there is a formula at the bottom of column B and C that yield a "", the formula breaks.

    In my workbook, 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!

    workbook: BOOK 6.xlsx

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Count number of cells in column per month, ignore blank cells

    Try this array formula in col E

    =SUMPRODUCT(--(B$2:B$133<>""),--(IFERROR(MONTH(B$2:B$133),0)=D2))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  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, ignore blank cells

    Awesome work Ace. I appreciate it.

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

    Re: Count number of cells in column per month, ignore blank cells

    Here's another one...

    =SUMPRODUCT(--(TEXT(B$2:B$133,"mmm")=TEXT(D2*29,"mmm")))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  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, ignore blank cells

    What if I wanted to find the average of values in column C that are associated with each month?

    Again, there will be a formula at the bottom of cells C and B that will return a blank value =""

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

    Re: Count number of cells in column per month, ignore blank cells

    Try this array formula**:

    =IFERROR(AVERAGE(IF(TEXT(B$2:B$133,"mmm")=TEXT(D2*29,"mmm"),C$2:C$133)),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down as needed.

+ 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. Count number of cells in column per month
    By lamdl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-10-2014, 04:25 PM
  2. Average the last 10 cells of a dynamic column but ignore blank cells & 0
    By mattadler22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2013, 11:37 PM
  3. [SOLVED] Count how many times a month appear but ignore blank cells
    By mdithi in forum Excel General
    Replies: 2
    Last Post: 03-26-2012, 05:38 PM
  4. Count how many times a month appear but ignore blank cells
    By ozzom_2000 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-24-2011, 10:46 AM
  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