+ Reply to Thread
Results 1 to 2 of 2

Subtracting Date/Time w/ Criteria

  1. #1
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Subtracting Date/Time w/ Criteria

    I wrote the following formula to subtract date/time and convert to minutes. It allows me to exclude anything under or over a specified number (in this case 1300).

    =IF(MOD(G2-F2,1)*1440>1300,"",MOD(G2-F2,1)*1440)

    I also want the formula to result in a blank when one of the dates/times I am using is blank. So instead of this date/time (8/31/2008 22:40) giving me 80 minutes when compared to a blank, I want the formula to give me a blank. Anytime there is a blank in G and F, I want the result to be blank and not a "false" number. PLEASE ASSIST as I know there has to be an easier way than sorting them all out....

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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