+ Reply to Thread
Results 1 to 9 of 9

Difference of dates by month!

  1. #1
    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

    Difference of dates by month!

    Hi

    I have start and end Date.

    Then columns for the end of eatch month.

    I need to split in eatch month column, the dates for eatch month, that all together, make the difference..!!

    I think it's better to take a look to the example.

    Thank you in advance.
    Attached Files Attached Files
    Last edited by Fotis1991; 02-14-2012 at 04:01 AM.
    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.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Difference of dates by month!

    See attached.

    Formula In D2 copied down: =IF($A2<=D$1,MIN(D$1,$B2)-$A2,0)
    Formula In E2 copied down and across: =IF($A2<=E$1,MIN(E$1,$B2)-$A2,0)-SUM(D2:$D2)

    Dom
    Attached Files Attached Files
    Last edited by Domski; 02-13-2012 at 11:36 AM.
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

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

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,412

    Re: Difference of dates by month!

    PLS IGNORE BELOW FORMULA BCZ OF MISUNDERSTOOD!

    In D2:
    =D$1-IF(C$1="",$A2,IF(D1<=$B2,C$1,IF(C$1<$B2,$B2,D$1)))
    Copy down and across
    Last edited by bebo021999; 02-13-2012 at 11:36 AM.
    Quang PT

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,412

    Re: Difference of dates by month!

    Value in J1 should be 31/7 than 30/7

  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: Difference of dates by month!

    @ Dom.

    Of course YES. This is it! Thank you. As i see, Today, it's your good day.

    @bebo

    Value in J1 should be 31/7 than 30/7
    Thank you.

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Difference of dates by month!

    My formula is a bit over complicated to be honest. bebo021999's would work fine.

    Dom

  7. #7
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,412

    Re: Difference of dates by month!

    Nooooop,
    As I said pls ignore, it is wrong! Yours is simple and logical.

  8. #8
    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: Difference of dates by month!

    To be honest, i saw this in post #3 and i did not look at bebo's formula at all!! Sorry for this!!

    PLS IGNORE BELOW FORMULA BCZ OF MISUNDERSTOOD!

    In D2:
    =D$1-IF(C$1="",$A2,IF(D1<=$B2,C$1,IF(C$1<$B2,$B2,D$1)))
    Copy down and across

  9. #9
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Difference of dates by month!

    Fair enough. I thought it looked like it would work.

    Dom

+ 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