+ Reply to Thread
Results 1 to 5 of 5

Raeding blank cells as zero values

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    11

    Raeding blank cells as zero values

    Hi,

    I have two cells which I want to add. But one or both cells may be blank. I want the value of any blank cell to be read as zero.

    I have attached a simplified attempt to get this to work using =IF(OR(A1="",B1=""),0,A1+B1) but this gives a zero value for the sum if either of the cells being summed is zero.

    Any ideas,

    Thanks,

    Shane
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Raeding blank cells as zero values

    Hi Shane,

    Maybe I'm missing it, but why not just =SUM(A2:B2) if you want C2 to equal 1,800.00
    HTH
    Regards, Jeff

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Raeding blank cells as zero values

    what's wrong with =SUM(A1:B1)?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    07-03-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Raeding blank cells as zero values

    That's weird the formulas are working now, before I was getting a #value error when a formula used a blank cell.

    Oh well problem solved.

    Thanks,

    Shane

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Raeding blank cells as zero values

    you'd get a value error if you use =a1+b1 and one of the cells is text or a space and even if its "" as the result of a formula sum() ignores text

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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