+ Reply to Thread
Results 1 to 4 of 4

SUMIF and show blank if zero on timesheet

  1. #1
    Forum Contributor
    Join Date
    12-21-2004
    Location
    MN
    MS-Off Ver
    Microsoft 365
    Posts
    211

    SUMIF and show blank if zero on timesheet

    I am using the following formula to calculate time on a timesheet.
    If I want it to show blank, if there is no time, how do I add that into this formula?

    =SUMIF($D$8:$D$155,"=2232",$G$8:$G$155)

    Thanks for your help!

  2. #2
    Registered User
    Join Date
    10-27-2006
    Posts
    43
    what is the =2232 for

  3. #3
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    you have to put it in an if statement

    if(formula=0,"",formula) is the basic form

    =if(SUMIF($D$8:$D$155,"=2232",$G$8:$G$155)=0,"",SUMIF($D$8:$D$155,"=2232",$G$8:$G$155))

    but in light of the above post

    =if(SUMIF($D$8:$D$155,2232,$G$8:$G$155)=0,"",SUMIF($D$8:$D$155,2232,$G$8:$G$155))

    may be better

    Regards

    Dav

  4. #4
    Forum Contributor
    Join Date
    12-21-2004
    Location
    MN
    MS-Off Ver
    Microsoft 365
    Posts
    211
    Sorry, I should have been more descriptive.
    The 2232 is the account code that the time is being coded to.
    One column, the employee puts the account code, and then the next column is their time in, then in the next, their time out.
    The formula I am using is looking at the account code column, and adding up all the hours that went to that particular account code.
    There may have been an easier way to do that, but I couldn't figure it out and am surprised I got it this far!

+ 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