+ Reply to Thread
Results 1 to 7 of 7

formula not to show 0 in cells when dragging existing formula

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    formula not to show 0 in cells when dragging existing formula

    Am using the following formula in a range of cells column D2

    Do not want the value of 0 to appear in the cells when dragging down.

    Any suggestion


    Please Login or Register  to view this content.
    BE 0
    FR 0
    FR 186
    IT 90
    FR 0
    FR 0

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,806

    Re: formula not to show 0 in cells when dragging existing formula

    Add an IF clause:

    =IF(SUMPRODUCT(CustomerA!Y$2:Y$915,--(CustomerA!$J$2:$J$915='Report '!$A2),--(CustomerA!$K$2:$K$915='Report '!$B2),--(CustomerA!$L$2:$L$915='Report '!$C2))=0,"",SUMPRODUCT(CustomerA!Y$2:Y$915,--(CustomerA!$J$2:$J$915='Report '!$A2),--(CustomerA!$K$2:$K$915='Report '!$B2),--(CustomerA!$L$2:$L$915='Report '!$C2)))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: formula not to show 0 in cells when dragging existing formula

    Rather than doubling up the formula, you can use a Custom Format to suppress the zeros so that they appear blank. If you are only expecting positive numbers, then you can use this Custom Format:

    General;;;

    If your numbers can be positive or negative, but you don't want to show zero, then the custom format would be:

    General;-General;;

    Of course, General could be replaced with a number format if you want a specific numeric display (like dates).

    Another way to avoid the doubling-up of the formula is to do this:

    =IFERROR(1/(1/SUMPRODUCT(CustomerA!Y$2:Y$915,--(CustomerA!$J$2:$J$915='Report '!$A2),--(CustomerA!$K$2:$K$915='Report '!$B2),--(CustomerA!$L$2:$L$915='Report '!$C2))),"")

    Hope this helps.

    Pete

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: formula not to show 0 in cells when dragging existing formula

    Another way is to leave your formula as it is, and to apply conditional formatting, such that if the cell value is zero then the foreground colour is set to white (or to whatever the background colour is for that cell), so white on white would effectively show the cell as blank.

    Hope this helps.

    Pete

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: formula not to show 0 in cells when dragging existing formula

    ?? An alternative:

    =IFERROR(1/(1/SUMPRODUCT(CustomerA!Y$2:Y$915,--(CustomerA!$J$2:$J$915='Report '!$A2),--(CustomerA!$K$2:$K$915='Report '!$B2),--(CustomerA!$L$2:$L$915='Report '!$C2))),"")
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  6. #6
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    Re: formula not to show 0 in cells when dragging existing formula

    Thank you all for assistance work great

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,725

    Re: formula not to show 0 in cells when dragging existing formula

    You're welcome - thanks for the rep.

    Pete

+ 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. Formula Dragging and skipping cells
    By Raiderbuck11 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-04-2017, 07:11 PM
  2. dragging a formula down through cells
    By anthony.maddick in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-30-2014, 08:16 AM
  3. Replies: 4
    Last Post: 07-22-2014, 06:05 PM
  4. Replies: 0
    Last Post: 03-13-2013, 12:25 PM
  5. Replies: 1
    Last Post: 04-30-2012, 10:01 PM
  6. [SOLVED] How to offset certain cells after dragging down a formula
    By Bram in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2005, 12:05 PM
  7. Dragging a formula across many cells
    By KrazyKevin in forum Excel General
    Replies: 2
    Last Post: 01-15-2005, 11:38 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