+ Reply to Thread
Results 1 to 3 of 3

Producing a result of zero if there is no data in the cell

  1. #1
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Producing a result of zero if there is no data in the cell

    I have a formula that works out how many hours long a shift is even if the time goes past midnight.

    =IF(L4<M4,M4-L4,M4+1-L4)

    The data in L4 and M4 are the starting and finishing times.

    However if there is no data in the cell then it returns a result of 24:00. Is there anyway I can change the formula to produce a zero return if there is no data in the cells?

    Much appreciated.
    Last edited by Marvo; 12-23-2012 at 02:04 PM.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Producing a result of zero if there is no data in the cell

    Do you mean

    Please Login or Register  to view this content.
    or shorter

    Please Login or Register  to view this content.
    Last edited by Ace_XL; 12-23-2012 at 01:46 PM.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Producing a result of zero if there is no data in the cell

    That works a treat. Thank you very, very much. Merry Christmas.

    Marvo

+ 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