+ Reply to Thread
Results 1 to 10 of 10

Sum formula to ignore empty cells

  1. #1
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    113

    Sum formula to ignore empty cells

    HI and thanks to all the people here for always be ready to help!

    I was wondering if someone can help me with a formula.

    I am using this formula =IF(J$4="","",(SUM(K5*M5,S5*U5,AA5*AC5,AI5*AK5,AQ5*AS5,AY5*BA5,BG5*BI5))) which works if every cell has a number, however once one is empty it returns a value error.

    Is there a way to have it do the same but ignore the cells that are empty?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Sum formula to ignore empty cells

    You could try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    instead is SUM(...)
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum formula to ignore empty cells

    Your "empty" cells aren't really empty. check them: =ISBLANK(cell). Probably there is something like ="" or result from another formula is ""

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Sum formula to ignore empty cells

    I cannot replicate the scenario. When I set up a similar sum of products formula and clear one of the cells, that pair is simply not included in the sum. It works this way because an empty cell is assumed to be 0, so that part of the sum becomes 0.

    Reading between the lines, we often use the word "empty" for a cell that contains a formula that returns null string "" -- even though technically this cell is not empty. If I enter a text string (including "" null string) into one of these cells, then I get the error value as you indicate. If this is the case, I would first reconsider using the null string value. If one returned 0 instead of "", then the sum of products formula that you are using should work correctly. There are ways to hide 0 values, if you just cannot stomach looking at that ugly goose egg. IMO, changing the null string to 0 would be the easiest way to resolve this error case.

    Of course, if I am wrong and something else is causing the error, then disregard this.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    113

    Re: Sum formula to ignore empty cells

    does not work, I left BG5 and BI5 empty and it returned the value error. I know the =product ignores empty cells but since my cells are not consecutive I can's make it work either.

  6. #6
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    113

    Re: Sum formula to ignore empty cells

    The cells that are "empty" are not empty in fact they have also a formula

  7. #7
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sum formula to ignore empty cells

    [ deleted by me ] because there are formulas

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,461

    Re: Sum formula to ignore empty cells

    Please post a sample workbook with some typical data so we can see what your data and formulae look like.

  9. #9
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,913

    Re: Sum formula to ignore empty cells

    Use N() formula:

    =IF(J$4="","",(SUM(N(K5)*N(M5),N(S5)*N(U5))

  10. #10
    Forum Contributor
    Join Date
    11-28-2011
    Location
    puerto rico
    MS-Off Ver
    Excel 2007
    Posts
    113

    Re: Sum formula to ignore empty cells

    Thks! the last one worked.

+ 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] Ignore empty cells
    By hanif in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-18-2017, 03:42 PM
  2. [SOLVED] Need a way to ignore empty cells in a sum/countif formula
    By Bniemeyer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-20-2014, 06:09 AM
  3. [SOLVED] Ignore empty cells in an IF formula
    By moppyau in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-09-2013, 06:42 AM
  4. Excel 2007 : Ignore empty cells? How?
    By PA0l0 in forum Excel General
    Replies: 3
    Last Post: 06-02-2011, 07:29 PM
  5. How to get a formula to ignore empty cells
    By scudder12 in forum Excel General
    Replies: 1
    Last Post: 10-02-2010, 06:18 PM
  6. Formula to use number in cell to left & ignore any empty cells
    By joya in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-13-2007, 12:52 PM
  7. Can a formula ignore empty cells?
    By Melissa in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-31-2006, 01:30 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