+ Reply to Thread
Results 1 to 6 of 6

SUMPRODUCT When Cell is blank then show blank not Zero 0

  1. #1
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Thumbs up SUMPRODUCT When Cell is blank then show blank not Zero 0

    Hi Experts!
    By using SUMPRODUCT function, if the cell is blank then show blank in the formula results rather then zero 0 .
    The Below Formula works ok but when there is a blank cell comes it shows 0 value rather then blank cell.

    I am attaching the excel file.


    =SUMPRODUCT(RawData!$DM$2:$DM$4000*((RawData!$DC$2:$DC$4000=B7)*(RawData!$DE$2:$DE$4000=$C$4)))
    Attached Files Attached Files
    Last edited by farrukh; 06-06-2020 at 12:16 AM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: SUMPRODUCT When Cell is blank then show blank not Zero 0

    How about this
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Spammer
    Join Date
    01-08-2015
    Location
    Cali, Colombia
    MS-Off Ver
    365
    Posts
    302

    Re: SUMPRODUCT When Cell is blank then show blank not Zero 0

    Hi, to both!

    If you use SUMPRODUCT with ranges of same dimensions, I prefer to use the matrix form, getting better performance:

    =IFERROR(1/(1/SUMPRODUCT(RawData!$DM$2:$DM$4000,--(RawData!$DC$2:$DC$4000=B6),--(RawData!$DE$2:$DE$4000=$C$4))),"")

    Better than SUMPRODUCT in this case, SUMIFS:

    =IFERROR(1/(1/SUMIFS(RawData!$DM$2:$DM$4000,RawData!$DC$2:$DC$4000,B6,RawData!$DE$2:$DE$4000,$C$4)),"")

    Another option, instead of IFERROR(1/(1/...),""), could be use custom formatting, hidding zeros. Blessings!

  4. #4
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Re: SUMPRODUCT When Cell is blank then show blank not Zero 0

    Hi Chemist / Johnmpl,
    Thank you for your kind help. It works great if we have a blank cell but one thing if the cell value is Zero 0 then formula fetch the result value 0 .
    I mean if Cell has no value ( Blank) then result blank or N/A , if the cell value is zero 0 then result required to be 0 not blank.

  5. #5
    Spammer
    Join Date
    01-08-2015
    Location
    Cali, Colombia
    MS-Off Ver
    365
    Posts
    302

    Re: SUMPRODUCT When Cell is blank then show blank not Zero 0

    Hi, again!

    You can try this formula instead:
    =IFERROR(--(LOOKUP(2,1/(RawData!DC$2:DC$4000=B6)/(RawData!DE$2:DE$4000=C$4),RawData!DM$2:DM$4000)&""),"")

    Blessings!

  6. #6
    Forum Contributor
    Join Date
    01-29-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2013
    Posts
    256

    Thumbs up Re: SUMPRODUCT When Cell is blank then show blank not Zero 0

    Perfect works ! Thank you !

+ 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] Dragging formula to add two columns, but need to show blank when other cell is blank
    By doesntexist in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-05-2018, 11:18 PM
  2. [SOLVED] Reference cell formula returning 0 when BLANK, need BLANK to show
    By williamc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-31-2016, 04:23 PM
  3. Averaging with a blank cell, needs to show blank calculation
    By Pstreicher in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-20-2015, 08:08 AM
  4. If cell blank OR another cell blank then show blank, if not display value
    By stevop622 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-09-2013, 04:07 AM
  5. show a zero instead of blank if a particular cell is blank
    By jeff dorlaque in forum Excel General
    Replies: 7
    Last Post: 08-22-2012, 01:02 AM
  6. [SOLVED] If one cell contains #, & other cell is blank, show message & require blank be resolved
    By jonvanwyk in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-19-2012, 02:23 PM
  7. Replies: 1
    Last Post: 09-23-2010, 01:24 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