+ Reply to Thread
Results 1 to 19 of 19

Ignore blank cells

  1. #1
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Ignore blank cells

    I have a row of cells, say, A1 to G1.
    I wish to sum the values in cells, say, A1, C1, F1 and G1 only. The chosen cells can have values 0, >0 or Blank. How do I sum the values and ignore the blank cell(s) without getting #VALUE!?
    Filling the blank cells with "0" is not an option.

    (Any blank cells may have a value added at a later date).

    Edit: I could use multiple 'IF' statements, but this is cumbersome. There must be a simpler way.

    Thanks in advance

    Alan
    Last edited by Zagra147; 03-01-2014 at 02:20 PM.

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,294

    Re: Ignore blank cells

    =SUM(A1,C1,F1,G1)
    Does this work?
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Ignore blank cells

    No. The blank cell(s) gives "#VALUE!"

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Ignore blank cells

    Hello Zagra147,

    It would depend on what you have in the Cells to be summed, like Formulae, Text, etc.

    Could you show us what you have in the respective cells in question?

    Regards
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignore blank cells

    Try this one

    =AGGREGATE(9,6,A1,C1,F1,G1)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Ignore blank cells

    Solved it using AGGREGATE(9,6,A1,C1,F1.G1).

    9 = SUM and 6 = Ignore error values.

    I knew there must be a simpler way than us loadsa 'IF' statements.

    Seems to be a very useful function - haven't used it before.

    Regards to all who have thought about this.

    Alan

  7. #7
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Ignore blank cells

    Alkey
    Thanks.
    I think our posts crossed!

    Alan

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Ignore blank cells

    You're welcome. Don't forget to thank those who helped by clicking on Add Reputation * and please mark thread as "Solved" if your issue has been resolved. (Selecting Thread Tools-> Mark thread as Solved).

  9. #9
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Ignore blank cells

    for versions lower than 2010, this could also be an option (a trick i learnt from Domenic):

    Please Login or Register  to view this content.
    a little more dynamic array-formula:

    Please Login or Register  to view this content.
    these would work in case errors existed in cells.
    Last edited by icestationzbra; 03-01-2014 at 03:06 PM. Reason: added drag-able formula
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  10. #10
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Ignore blank cells

    Winon

    Just simple numbers - the AGGREGATE function works fine.

    Alan

  11. #11
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Ignore blank cells

    Hello Zagra147,

    Thank you for the feedback.

    I am on Excel 2007, which doesn't have the AGGREGATE feature, so I could not consider it as a solution. Maybe it is time for me to upgrade.

    Regards.

  12. #12
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Ignore blank cells

    icestationzbra

    SUM(SUMIF(INDIRECT({"a1","c1","f1","g1"}),">0"))

    That too works, but only for a single row - it cannot be copied down a column unless you do a lot of manual editing.

    Regards

    Alan

  13. #13
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Ignore blank cells

    @ icestationzbra,

    Very nice alternative, which I would prefer using to handle Excel versions earlier than 2010.

    Regards

  14. #14
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Ignore blank cells

    I jumped from 2000 to 2010 so I haven't figured out all the extra functions yet...

  15. #15
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Ignore blank cells

    This would handle just about all versions of Excel,

    =SUM(SUM(A1),SUM(C1),SUM(F1),SUM(G1))

  16. #16
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Ignore blank cells

    Winon

    =SUM(SUM(A1),SUM(C1),SUM(F1),SUM(G1))

    That too works a treat

    Regards

    Alan

  17. #17
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Ignore blank cells

    Very informative posts.

    Thanks one and all.

    Alan

  18. #18
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Ignore blank cells

    Zagra147,

    Thank you for the feedback.

    Personally, I prefer to try and formulate in such a way that things are not limited to later versions of the earliest workable Excel options.

    Kind Regards.

  19. #19
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Ignore blank cells

    @ Zagra147,

    Thank you for adding to my Reputation.

    Best Regards.

+ 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. Ignore blank cells and truly blank cells in named range?
    By hschillig in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-13-2014, 02:56 PM
  2. How can I make a macro ignore blank cells? - Blank Cells have formulas
    By mz1161 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2013, 08:54 AM
  3. Ignore blank cells
    By Teacher in forum Excel General
    Replies: 13
    Last Post: 08-20-2011, 03:43 PM
  4. How To ignore blank cells....
    By gtdi-95 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-15-2008, 06:03 AM
  5. how do you ignore blank cells
    By Kerry in forum Excel General
    Replies: 1
    Last Post: 02-16-2005, 10:42 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