+ Reply to Thread
Results 1 to 5 of 5

SUMIF.... but if value is zero how to return a "0" into the cell

  1. #1
    Registered User
    Join Date
    12-19-2018
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2016 for Mac
    Posts
    3

    SUMIF.... but if value is zero how to return a "0" into the cell

    Hi,

    I'm working in an excel spreadsheet in Excel 2016 for Mac.

    I'm working in a worksheet that is actually a print sheet form that references a bunch of data in my primary worksheet. I set the preferences to leave a cell blank if there was no value (instead of showing a zero). Otherwise there is zeros all over my worksheet everywhere.

    But... there are a few instances where I am checking a range to sum a column of numbers if there is an "H" in the range I'm checking.

    =SUMIF(H381:H392,"H",G381:G392)

    It works perfect. But since it's calculating the number of working hours for the labor code (H), I'd like the cell to show '0' and not just remain blank if the hours for that individual = 0.

    Any help would be greatly appreciated.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2503
    Posts
    13,702

    Re: SUMIF.... but if value is zero how to return a "0" into the cell

    Hi scott5339. Welcome to the forum.

    Since I've never set my preferences to blank if zero and don't have a sample to test (that I can trust) my best guess is try this.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    or possibly
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Does that work?
    Dave

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: SUMIF.... but if value is zero how to return a "0" into the cell

    Or maybe this?
    =if(H381="H",SUMIF(H381:H392,"H",G381:G392),0)

    You may need to absolute your ranges there?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    12-19-2018
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2016 for Mac
    Posts
    3

    Re: SUMIF.... but if value is zero how to return a "0" into the cell

    Thank you Dave... Unfortunately that didn't work.

  5. #5
    Registered User
    Join Date
    12-19-2018
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2016 for Mac
    Posts
    3

    Re: SUMIF.... but if value is zero how to return a "0" into the cell

    Hi Ford.
    Thanks.... I'll give that a try over the weekend.

+ 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] Formula to Locate Matching Data in Worksheets and return "1" or "0" to a specified Cell
    By hammer2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-30-2015, 04:52 AM
  2. Replies: 12
    Last Post: 06-12-2014, 02:11 PM
  3. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  4. [SOLVED] SUMIF - If there is no value to return, return "NO DATA TO DISPLAY"
    By Ben1985 in forum Excel General
    Replies: 3
    Last Post: 12-01-2013, 05:40 PM
  5. [SOLVED] IF Formula not working - need to return "NO" if cell is 1% greater or "YES" if less 1%
    By maryren in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-26-2013, 11:34 AM
  6. Return "green", "yellow" or "red" from date/age and priority ranking
    By Cantaloop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 12:12 AM
  7. Replies: 3
    Last Post: 02-16-2011, 02:55 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