+ Reply to Thread
Results 1 to 4 of 4

COUNTIFs formula returning a #VALUE!

  1. #1
    Registered User
    Join Date
    02-26-2014
    Location
    North East, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    COUNTIFs formula returning a #VALUE!

    Hi all,

    First time of the forum, so I imagine this has been answered already...
    I'm trying to get a number count from multiple criterias and I'm using the following COUNTIFS formula

    =COUNTIFS('[Encounter_Design.xlsx]Low 1'!$G:$G, "NCL", '[Encounter_Design.xlsx]Low 1'!$AP:$AZ, "yes")

    I am pulling the information from another excel doc.

    However when I run this formula I get a #VALUE! outcome. I don't think it's anything to do with the fact I'm pulling the info from another doc as when I run a similar formula using COUNTIF it works fine.

    Basically I only want to get a count if G:G is NCL and AP:AZ is yes

    Thanks

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: COUNTIFs formula returning a #VALUE!

    Countifs needs the ranges to be of the same dimensions
    Both would need to be single column criteria ranges.

    So you'd have to do countifs(col1)+countifs(col2)+countifs(col3)

    I know, that's tedious. And yes there is a better way

    Try
    =SUMPRODUCT(('[Encounter_Design.xlsx]Low 1'!$G:$G="NCL")*('[Encounter_Design.xlsx]Low 1'!$AP:$AZ="yes"))

    However, I strongly recommend using definate ranges instead of entire columns.
    Even though XL2007+ allows it, it is still a major performance hit with sumproduct.

    So keep the row#s limited to around 10% more than is actually needed
    So if you actually have 1000 rows, just use 1100 rows in the ranges

    =SUMPRODUCT(('[Encounter_Design.xlsx]Low 1'!$G1:$G1100="NCL")*('[Encounter_Design.xlsx]Low 1'!$AP1:$AZ1100="yes"))

  3. #3
    Registered User
    Join Date
    02-26-2014
    Location
    North East, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: COUNTIFs formula returning a #VALUE!

    Yea, this worked...And you were right, excel wigged out using an entire columns as a range!

    All sorted now! Thanks

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: COUNTIFs formula returning a #VALUE!

    Glad to help, thanks for the feedback.

+ 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] COUNTIFS returning #VALUE!
    By photoryan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2013, 01:07 AM
  2. SUMPRODUCT and COUNTIFS formula that is returning #DIV/0!
    By caseyjones05 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-19-2013, 03:37 PM
  3. [SOLVED] COUNTIFS Fuction returning wrong data
    By christopherw34 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-02-2012, 12:31 PM
  4. [SOLVED] COUNTIFS Function returning wrong data
    By christopherw34 in forum Excel General
    Replies: 8
    Last Post: 05-02-2012, 12:29 PM
  5. Replies: 0
    Last Post: 12-16-2011, 09:01 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