+ Reply to Thread
Results 1 to 5 of 5

Return desired result based on a condition

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    40

    Return desired result based on a condition

    Is there a way to add to this to say if it = 0 then 0 else blank ?

    =IF(SUM(D19:D25)=0,"0",SUM(D19:D25))

    Thanks for your help in advance last peice of this excel sheet I wont have to touch again =)

  2. #2
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: =If(sum.. last one and im golden =)

    You do not need to put the 0 in quotes, unless there is a specific need for the 0 to be a text 0, rather than the number 0.

    =IF(SUM(D19:D25)=0,0,SUM(D19:D25))

    Please clarify your question. To me it sounds like you want this:

    =IF(SUM(D19:D25)=0,0,"")

    But this doesn't make sense to me because then why sum at all?

  3. #3
    Registered User
    Join Date
    01-17-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Return desired result based on a condition

    =IF(SUM(D19:D25)=0,"",SUM(D19:D25))

    I have cells d19 to d25 that have numbers ranging 0-9 and what I would like is celld18 to give me the sum, but if that sum is 0 then show 0, but at times the cells can be blank so if the cells are blank show blank

  4. #4
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Return desired result based on a condition

    So, if all the cells in the range are blank, you want it to be blank?

    =IF(COUNTA(D19:D25)=0,"",SUM(D19:D25))

  5. #5
    Registered User
    Join Date
    01-17-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Return desired result based on a condition

    1 gold star...yup..Thanks a ton

+ 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