+ Reply to Thread
Results 1 to 6 of 6

Trouble with sumproduct formula counting blanks as 1

  1. #1
    Registered User
    Join Date
    06-01-2017
    Location
    Chicago, IL
    MS-Off Ver
    2013
    Posts
    3

    Question Trouble with sumproduct formula counting blanks as 1

    Hello!

    Basically, I am trying to highlight cells in a large database that match newly entered data (to help select similar previous cases).

    Please see screenshots here: http://imgur.com/a/JMSz5

    I'm having trouble with one of my formulas (not sure if this is the fault of the conditional formatting highlighting formula or the total column or both) counting blank cells as 1.

    You can see that even blank cells are being counted as highlighted matches & the total column as 18 (should be 0).

    The conditional formatting applied to the range E5:V11 (scores) is =ABS(E$2-E5)<=$W$2

    The formula in W5 to count the number of targets met is =SUMPRODUCT(--(ABS(E5:V5-$E$2:$V$2)<=$W$2)), then copied down.

    Ideas on how to remedy? Any help/suggestions would be greatly appreciated!
    Cheers!!!

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

    Re: Trouble with sumproduct formula counting blanks as 1

    You can add a criteria to no include blanks..

    =SUMPRODUCT(--(ABS(E5:V5-$E$2:$V$2)<=$W$2),--(E5:V5<>""))

  3. #3
    Registered User
    Join Date
    06-01-2017
    Location
    Chicago, IL
    MS-Off Ver
    2013
    Posts
    3

    Re: Trouble with sumproduct formula counting blanks as 1

    This worked great! Thank you so much!

    The conditional formatting (=ABS(E$2-E5)<=$W$2) is still highlighting blank cells.

    I tried: =ABS((E$2-E5)<=$W$2),--(E5:V5<>"")) but am getting an error. Any ideas?

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

    Re: Trouble with sumproduct formula counting blanks as 1

    For the CF Use the AND function

    =AND(ABS(E$2-E5)<=$W$2,E5<>"")

  5. #5
    Registered User
    Join Date
    06-01-2017
    Location
    Chicago, IL
    MS-Off Ver
    2013
    Posts
    3

    Re: Trouble with sumproduct formula counting blanks as 1

    Yay! Thank you sooo much!!!

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

    Re: Trouble with sumproduct formula counting blanks as 1

    You're welcome.

+ 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] formula help needed!! - counting a column that has blanks
    By SallyBV in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-29-2014, 12:01 PM
  2. Having trouble with SUMPRODUCT formula
    By JohnEnglish in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-21-2014, 03:46 PM
  3. [SOLVED] Stop counting the blanks in formula
    By Biogeek1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-05-2013, 02:48 PM
  4. =sum formula not counting blanks.
    By Kuzman15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-31-2013, 06:05 PM
  5. [SOLVED] Sumproduct counting blanks
    By yenaled in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-30-2013, 03:03 AM
  6. Ignore blanks in sumproduct formula
    By Rhyl in forum Excel General
    Replies: 4
    Last Post: 02-02-2012, 11:42 AM
  7. Trouble Shooting SumProduct Formula
    By rgold in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-01-2009, 01:42 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