+ Reply to Thread
Results 1 to 11 of 11

Formula for days lapsed in current month with other variables to consider.

  1. #1
    Registered User
    Join Date
    12-30-2011
    Location
    Mobile, al
    MS-Off Ver
    Excel 2013
    Posts
    42

    Formula for days lapsed in current month with other variables to consider.

    Needed -
    Column S will show how many days this month something was on rent starting with cell S4. Cell K4 is the rental start date. Cell M4 is rental stop date (which could have no data if unit is still on rent) If the start date is before the first of the current month, I want the formula to only figure from the 1st day of current month to the stop date (M4) or to (today) if it still on rent. I also want to keep the cells in column S blank until K4 has data.

    Other info
    Cell AH4 has begining of current month with this formula =TODAY()-DAY(TODAY())+1
    Cell AI4 has this formula =TODAY()

    Thanks for any help.
    Last edited by jondon; 01-03-2012 at 09:19 AM. Reason: More info to consider if making a formula to help me

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula for days lapsed in current month with other variables to consider.

    Do you mean this: =MIN(M4,TODAY())-DATE(YEAR(TODAY()),MONTH(TODAY()),1)

  3. #3
    Registered User
    Join Date
    11-06-2011
    Location
    Massachusetts, USA
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Formula for days lapsed in current month with other variables to consider.

    I don't think that would account for rentals that started this month. Adding a modification for that:

    =MIN(M4,TODAY())-MAX(DATE(YEAR(TODAY()),MONTH(TODAY()),1),K4)

  4. #4
    Registered User
    Join Date
    12-30-2011
    Location
    Mobile, al
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Formula for days lapsed in current month with other variables to consider.

    Almost, It didnt take into consideration that the star date (K4) came after the first of the month. Also I would like to drag the formula down but leave the cells empty until I put data in K column.

  5. #5
    Registered User
    Join Date
    12-30-2011
    Location
    Mobile, al
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Formula for days lapsed in current month with other variables to consider.

    Th second formula worked great!!! Now can I leave cells blank.. THANKS

  6. #6
    Registered User
    Join Date
    11-06-2011
    Location
    Massachusetts, USA
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Formula for days lapsed in current month with other variables to consider.

    Modified to only show if K has a value:

    =IF(K4,MIN(M4,TODAY())-MAX(DATE(YEAR(TODAY()),MONTH(TODAY()),1),K4),"")

  7. #7
    Registered User
    Join Date
    12-30-2011
    Location
    Mobile, al
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Formula for days lapsed in current month with other variables to consider.

    Works Perfect!!! Thank you very much!

  8. #8
    Registered User
    Join Date
    12-30-2011
    Location
    Mobile, al
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Formula for days lapsed in current month with other variables to consider.

    Need a little more help with this. Cell S4 is still calculating. I show -13 days on rent this month when the off rent day is 12/19/11. Is there a fix for that.

    equipment sheet final.xls
    Last edited by jondon; 01-03-2012 at 09:51 AM.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: Formula for days lapsed in current month with other variables to consider.

    Maybe this can solve it:

    =IF(MONTH(K4)=MONTH(TODAY()), MIN(M4, TODAY())-MAX(DATE(YEAR(TODAY()), MONTH(TODAY()), 1), K4), "")

    But now is the question: can rents go in the next month or only in current month?

  10. #10
    Registered User
    Join Date
    12-30-2011
    Location
    Mobile, al
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Formula for days lapsed in current month with other variables to consider.

    Almost there. When I drag it down, all the empty rows show rent. I can live with that but would like to leave all cells in a row blank until data is entered. I really appreciate the time you guys have invested in helping me.

    If I put on rent 11/1/11, monthly revenue shows "#VALUE!"
    Last edited by jondon; 01-04-2012 at 09:05 AM. Reason: Found another issue

  11. #11
    Registered User
    Join Date
    12-30-2011
    Location
    Mobile, al
    MS-Off Ver
    Excel 2013
    Posts
    42

    Re: Formula for days lapsed in current month with other variables to consider.

    Is there a way to make the row move to sheet 2 at the end of month if data is in column "O"? If so the previous formula would work fine.

+ 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