+ Reply to Thread
Results 1 to 5 of 5

Formula not allowing 00:00 to be blank?

  1. #1
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Exclamation Formula not allowing 00:00 to be blank?

    Please Login or Register  to view this content.
    The formula above is ment to return one of two different values. One type of value does math subtracting time to calculate the number of hours that applies to a particular label. The other value is if none of the labels apply, then the cell should simply reflect the value of D6 in time format.

    So, you could have a result of a number, such as 4, or a result of time, such as 23:00. The problem I am having is if D6 is blank, it is returning a result of 00:00 (when the math calculating time is N/A due to a label not being selected). If D6 is blank, I need the cell containing the formula to also be blank.

    Using the advanced options to deselect the box that allows a zero value to remain blank does not fix the problem. I am not sure why this is, but I suspect it is because of the last part of the formula. I should also note that the cell is formatted as "General".


    Any help is greatly appreciated.
    Last edited by jonvanwyk; 12-12-2010 at 08:52 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Re: Formula not allowing 00:00 to be blank?

    =IF(OR(E5="V1",E5="V2",E5="V3"),(D6-D5+(D6<D5))*24,TEXT(D6,"hh:mm"),"")
    May be the solution

  3. #3
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Formula not allowing 00:00 to be blank?

    Quote Originally Posted by davesexcel View Post

    =IF(OR(E5="V1",E5="V2",E5="V3"),(D6-D5+(D6<D5))*24,TEXT(D6,"hh:mm"),"")

    May be the solution
    It says I have "entered too many arguments when I attempt your solution. Any other ideas? :-)

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula not allowing 00:00 to be blank?

    =IF(D6="","",IF(OR(E5="V1",E5="V2",E5="V3"),(D6-D5+(D6<D5))*24,TEXT(D6,"hh:mm")))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: Formula not allowing 00:00 to be blank?

    Quote Originally Posted by martindwilson View Post
    =IF(D6="","",IF(OR(E5="V1",E5="V2",E5="V3"),(D6-D5+(D6<D5))*24,TEXT(D6,"hh:mm")))
    GENIUS! Yay!

+ 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