Closed Thread
Results 1 to 5 of 5

Subtracting dates

Hybrid View

  1. #1
    Registered User
    Join Date
    09-13-2009
    Location
    Chepstow, wales
    MS-Off Ver
    Excel 2003
    Posts
    2

    Smile Subtracting dates

    I've got a table (5 columns) with a list of dates. I want to subtract the dates in each column. I've no problem with subtracting the dates per se, however here's the problem.

    I need to subtract them in ascending order i.e the largest minus the 2nd largest, the 2nd largest minus the 3rd largest etc. However there is no order of the dates across the 5 columns. I.e on some rows, the largest will be in column 3, on others it will be in column 1.

    Any ideas?

    I've attached a file with the typical table on the LH side. On the RH side is what I need to get out of it, however I had to create this manually. I've got a very big list so I need a formula, macro that can do it for me.

    Help gratefully received!
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    re: Subtracting dates

    In G5 and copy across and down,

    =B5 - LARGE($A5:$E5, RANK(B5, $A5:$E5) + 1)

    K5 and down, =MAX(A5:E5) - MIN(A5:E5)
    Last edited by shg; 09-13-2009 at 05:23 PM. Reason: wrong cells for formulas ...
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-13-2009
    Location
    Chepstow, wales
    MS-Off Ver
    Excel 2003
    Posts
    2

    Thumbs up Re: Subtracting dates

    Works a treat....never would have got there on my own. Introduced me to a new function (rank)....Many thanks

  4. #4
    Registered User
    Join Date
    02-18-2014
    Location
    Ampang, Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    35

    Re: Subtracting dates

    I got another issue too here...

    Subtract these 2 dates, exclude Sundays & Holidays (in a list)

    And I'm outside from US.

    Eg:
    DATE ISSUE DATE CLOSED
    A B
    21/1/2013 21/2/2013
    14/2/2013 28/5/2013

    Is someone could help me??

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Subtracting dates

    Pls take a look to forum rules.

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

    And as i see you have already created your own thread.....
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed 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