+ Reply to Thread
Results 1 to 5 of 5

COUNTIFS criteria over multiple columns - #VALUE error

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Vietnam
    MS-Off Ver
    Excel 2010
    Posts
    382

    Question COUNTIFS criteria over multiple columns - #VALUE error

    Hi,

    I have a data sheet with multiple columns and generally need to COUNT how many records match the following criterias:

    1) Equal or older than 1st day of current month in current year
    2) Below first day of next month in current year
    3) content in columns D:E matches a specific string

    Steps 1 and 2 are not problem, but once I add the third criteria the formula breaks, likely because the criteria is part of a `COUNTIFS` statement which does not allow to match a single string across multiple columns. It works just fine when I change the column range from `D:E` to `D:D`.

    How can I achieve the above with a single formula?

    Current formula:
    `=COUNTIFS(Data!$A:$A,">="&DATE(YEAR($F$1),C$3,1),Data!$B:$B,"<"&DATE(YEAR($F$1),MONTH(C$3)+1,1),Data!$C:$G,$A4)`

    Please see sample for more details.

    Thank you!

    Excel Sample.xlsx

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,642

    Re: COUNTIFS criteria over multiple columns - #VALUE error

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ( Make your range an Excel Table and rebuild the formula accordingly to cope with varying range lengths)

  3. #3
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    2,009

    Re: COUNTIFS criteria over multiple columns - #VALUE error

    Summary

    C4=SUMPRODUCT((Data!$A$2:$A$6>=DATE(YEAR(Summary!$F$1),MONTH(Summary!C$3),1))*(Data!$B$2:$B$6<EDATE(DATE(YEAR(Summary!$F$1),MONTH(Summary!C$3),1),1))*(Data!$C$2:$G$6=Summary!$A4))

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,642

    Re: COUNTIFS criteria over multiple columns - #VALUE error

    @Carcalla
    Any significant differences between our answers?

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    2,009

    Re: COUNTIFS criteria over multiple columns - #VALUE error

    =SUMPRODUCT(--(Data!$A$2:$A$10>=DATE(YEAR($F$1),MONTH(C$3),1))*(Data!$B$2:$B$10<DATE(YEAR($F$1),MONTH(C$3)+1,1))*(Data!$C$2:$G$10=$A4))


    This is correct for me

+ 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-16-2021, 05:36 PM
  2. [SOLVED] COUNTIFS between two dates over multiple columns with additional criteria
    By Knawl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-22-2021, 11:31 AM
  3. Replies: 28
    Last Post: 05-28-2019, 08:17 AM
  4. Countifs - multiple columns with the same criteria
    By danici in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-17-2017, 07:07 AM
  5. [SOLVED] 3 Criteria COUNTIFS #VALUE! Error
    By oneyejack77 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-07-2017, 04:00 PM
  6. [SOLVED] Countifs on multiple columns & criteria
    By tabkaz in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-13-2016, 02:59 AM
  7. Countifs Help with multiple columns in one criteria
    By itobon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-30-2015, 02:03 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