+ Reply to Thread
Results 1 to 4 of 4

Count column w/blanks & values based on specific date

  1. #1
    Registered User
    Join Date
    11-25-2009
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    30

    Count column w/blanks & values based on specific date

    Hi.

    I am in desperate need of a function that will count a column of data where there are blanks and values based on a certain date that will also capture any data that is added after refreshing the table from Access.

    I have tried several functions but this is what I have: =(ROWS('TouchBack Detail'!$Q:$Q)*COLUMNS('TouchBack Detail'!$Q:$Q))+(COUNTIFS('TouchBack Detail'!$B:$B,'Nov TouchBack Summary'!B$1)). The result should be 3 but it’s including all other cells in the column that are not and should not be included in the refreshed table’s data (Table_TouchBack.accdb).

    I have attached the spreadsheet for review. The function is in cell B27 highlighted in yellow.

    Thank you in advance.

    Nickelcell1
    Attached Files Attached Files
    Last edited by nickelcell1; 11-30-2009 at 04:09 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Count column w/blanks & values based on specific date

    Rows() returns the number of rows in the specified range. Columns() returns the number of columns in the specified range. Both formulas do not have anything to contribute to your goal, i.e counting how many rows in a range of cells match a given date.

    You probably need

    =SUMPRODUCT(('TouchBack Detail'!B3:B12='Nov TouchBack Summary'!B1)*ISNUMBER('TouchBack Detail'!Q3:Q12))

    Adjust ranges to suit.

    The result is 2, because the third value in column Q is on a different date.


    I'd advise against using whole column references in this kind of setup, since looking at the number of fields you plan to fill with similar formulas, you'll soon be looking at increasing calculation times. You may want to look into Pivot tables to report on the raw data instead.
    Last edited by teylyn; 11-25-2009 at 07:53 PM.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Count column w/blanks & values based on specific date

    Given use of XL2007 perhaps:

    Please Login or Register  to view this content.
    Even though COUNTIFS is quite efficient I would still concur that restricting ranges to some extent would be advisable.

    If you don't need rows 26 & 27 you could just use AVERAGEIFS function for row 28, ie: =AVERAGEIFS('TouchBack Detail'!Q:Q,'TouchBack Detail'!$B:$B,B$1)

    EDIT:
    you state answer should be three rather than two - ie all rows should be included... in which case just use COUNTIF as opposed to COUNTIFS and check just the date column, =COUNTIF('TouchBack Detail'!$B:$B,B$1).
    Last edited by DonkeyOte; 11-26-2009 at 05:36 AM.

  4. #4
    Registered User
    Join Date
    11-25-2009
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Count column w/blanks & values based on specific date

    Thanks all for your help. I guess I was making it way too complex. The =countif works fine. Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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