+ Reply to Thread
Results 1 to 9 of 9

Thread: Difference of dates by month!

  1. #1
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    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 03:01 AM.
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    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.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  2. #2
    Forum Guru Domski's Avatar
    Join Date
    12-14-2009
    MS-Off Ver
    What does it matter?
    Posts
    3,933

    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 10: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
    Valued Forum Contributor
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    455

    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 10:36 AM.
    Click the star icon in left-corner of my post if you find my post userful!

    Quang PT
    quangphanidico@yahoo.com
    PM me: Y!M: quangphanidico

  4. #4
    Valued Forum Contributor
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    455

    Re: Difference of dates by month!

    Value in J1 should be 31/7 than 30/7
    Click the star icon in left-corner of my post if you find my post userful!

    Quang PT
    quangphanidico@yahoo.com
    PM me: Y!M: quangphanidico

  5. #5
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    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.
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    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.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  6. #6
    Forum Guru Domski's Avatar
    Join Date
    12-14-2009
    MS-Off Ver
    What does it matter?
    Posts
    3,933

    Re: Difference of dates by month!

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

    Dom
    "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.

  7. #7
    Valued Forum Contributor
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    455

    Re: Difference of dates by month!

    Nooooop,
    As I said pls ignore, it is wrong! Yours is simple and logical.
    Click the star icon in left-corner of my post if you find my post userful!

    Quang PT
    quangphanidico@yahoo.com
    PM me: Y!M: quangphanidico

  8. #8
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    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
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    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.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  9. #9
    Forum Guru Domski's Avatar
    Join Date
    12-14-2009
    MS-Off Ver
    What does it matter?
    Posts
    3,933

    Re: Difference of dates by month!

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

    Dom
    "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.

+ 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.2.0