+ Reply to Thread
Results 1 to 15 of 15

Leave cell blank until data is posted

  1. #1
    Registered User
    Join Date
    04-27-2009
    Location
    Montclair, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Leave cell blank until data is posted

    I would like to do a sum to different cell but only if data is entered. If data is not enter then I want that cell to be blank. My formula below gives me #value! when I don't have value in the cells. The data is supposed to be diagonally but it doesn't look correct when I posted so I have to have the data going down.

    Ex:

    A1=2
    B1=4
    C1=5
    D1=8

    Total is 19


    My formula is =IF(AND(A1="",B1="",C1="",D1="",E1=""),"",SUM(A1+B1+C1+D1+E1))

    thanks
    Last edited by Philangr8; 05-27-2016 at 07:23 PM.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leave cell blank until data is posted

    Here's one way...

    =IF(COUNT(A1:E1)<5,"",SUM(A1:E1))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    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,469

    Re: Leave cell blank until data is posted

    Try:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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


  4. #4
    Registered User
    Join Date
    04-27-2009
    Location
    Montclair, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Leave cell blank until data is posted

    thank you Tony but I should have mentioned that the data cell is not in the same row or column. It is spread out in different cells so it won't work.

  5. #5
    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,469

    Re: Leave cell blank until data is posted

    Tony and I have taken slightly different approaches. With mine, if all the cells are blank, you get a blank. Otherwise it sums what is there. With Tony's approach, if any cells are blank, you get a blank.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leave cell blank until data is posted

    Quote Originally Posted by Philangr8 View Post
    thank you Tony but I should have mentioned that the data cell is not in the same row or column. It is spread out in different cells so it won't work.
    Then tell us what the REAL cells are.

  7. #7
    Registered User
    Join Date
    04-27-2009
    Location
    Montclair, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Leave cell blank until data is posted

    Sorry about that

    Ex:

    A1=2
    A7=4
    A10=5
    A17=8

    Total is 19


    My formula is =IF(AND(A1="",A7="",A10="",A17=""),"",SUM(A1+A7+A10+A17))

  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,469

    Re: Leave cell blank until data is posted

    Then
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    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,469

    Re: Leave cell blank until data is posted

    So
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leave cell blank until data is posted

    Ok, this emulates your current formula:

    =IF(COUNT(A1,A7,A10,A17)=0,"",SUM(A1,A7,A10,A17))

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

    Re: Leave cell blank until data is posted

    Quote Originally Posted by Philangr8 View Post
    =IF(AND(A1="",B1="",C1="",D1="",E1=""),"",SUM(A1+B1+C1+D1+E1))
    Like this ...

    =IF(AND(A1="",B1="",C1="",D1="",E1=""),"",SUM(A1,B1,C1,D1,E1))

  12. #12
    Registered User
    Join Date
    04-27-2009
    Location
    Montclair, CA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Leave cell blank until data is posted

    It worked, thank you so much Tony!

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leave cell blank until data is posted

    Quote Originally Posted by phuocam View Post
    ...sum(a1,b1,c1,d1,e1))
    sum(a1:e1)

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Leave cell blank until data is posted

    You're welcome. Thanks for the feedback!

  15. #15
    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,469

    Re: Leave cell blank until data is posted


+ 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] Leave cell blank unless data entered
    By ExcelDummy77 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-22-2015, 11:05 AM
  2. Calculate differnce between 2 dates, but if 1 date cell is blank leave cell blank
    By Vicious00013 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-11-2014, 11:31 PM
  3. Leave Cell Blank if it has NO data (but the cell Contains Formula)
    By LadyB21 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-07-2013, 09:21 PM
  4. Leave a cell blank if some data is missing
    By Topher53180 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-13-2013, 05:28 AM
  5. [SOLVED] Simple pull exact text from cell, if blank it pulls up a 0. How to leave it as blank?
    By sharpmel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-30-2012, 02:20 PM
  6. Copy data but leave target cell blank
    By MarcoAUA in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2012, 02:27 PM
  7. Leave cell blank if no data
    By Millerk in forum Excel General
    Replies: 3
    Last Post: 03-01-2006, 11:00 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