+ Reply to Thread
Results 1 to 8 of 8

calculating months based on specified number of days

  1. #1
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    calculating months based on specified number of days

    Hello,

    I am trying to figure out a way to calculate months in columns without exceeding a specified number of days. Example:

    Person A starts - 8/15/16 - Allocate partial month; full month; full month; allocate partial month
    Person B starts - 8/1/16 - allocate full month; allocate full month; allocate full month
    Person C starts - 9/21/16 - etc.

    The specified number of days is 90. I need to allocate say 100,000 for each of them over the 90 days where it prorates the beginning month and ending month if it isn't a full month but spreads the full months evenly and not using number of days in the month where the full month of January would not equal the full month of February due to less days in February. It would need to stop calculating at 90. However, one person may get set to 120 days and another at 60 days. I am trying not to use VBA in this case to make it a simple workbook. It is for another person to use and didn't want to get into the VBA maintenance with them.

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: calculating months based on specified number of days

    Are you able to post a sample workbook (Use: Go Advanced --> Manage Attachments) so we can see what you're working with? Please be sure to remove or alter any sensitive data.

  3. #3
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: calculating months based on specified number of days

    see attached. Currently they are using goal seek to get to the amounts. We have tried using formulas with Days360 and other methods but we do not get to the result goal seek gets to.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: calculating months based on specified number of days

    See this ...
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: calculating months based on specified number of days

    Is 120 the maximum number of days? 120 days could span into 5 months, which your current setup isn't really equipped for

  6. #6
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: calculating months based on specified number of days

    I don't know if I understood the task the same way Phuocam did, but take a look at the attachment to see if I got there...

    I built it out to span five months, so it should be good for any number of days up to and including 120 days. I made tweaks to columns H, J, and K. I didn't notice column I, so you could actually use I to make the formula in J a bit shorter. Regardless, to get the base amount per month, I used:

    =$F$5/($H$7/DAY(EOMONTH($G$7,0))+$H$8/DAY(EOMONTH($G$8,0))+$H$9/DAY(EOMONTH($G$9,0))+$H$10/DAY(EOMONTH($G$10,0))+$H$11/DAY(EOMONTH($G$11,0)))

    For the amount in a particular month, I used a slightly more flexible version of your formula:
    =H7/DAY(EOMONTH(G7,0))*J7

    I made some slight adjustments to column H to account for a fifth month and make the returns incorporate the possibility of 2,3, or 5 months. The end results match your results in columns A:D, which I assumed was the goal. Hopefully I was right? Or at least helpfully wrong?
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    10-24-2012
    Location
    Chicago
    MS-Off Ver
    O365
    Posts
    311

    Re: calculating months based on specified number of days

    Looks great and ties out nicely. Thanks for all the help.

  8. #8
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: calculating months based on specified number of days

    My pleasure, good luck!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Calculating number of months given a set amount of days
    By jacobus1231 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-12-2016, 05:35 AM
  2. calculating Months from days!!
    By meus in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-06-2015, 05:57 AM
  3. Calculating rounded number of days based on totals
    By pmoby in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2014, 05:28 AM
  4. Months in a year based on number of days
    By managingcrap in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-23-2014, 10:58 AM
  5. calculating the experience in number of years, months, days.
    By marineharish in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-22-2013, 12:47 PM
  6. Calculating Number of Months passed between two sets of days
    By Cindylu3 in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 01-24-2009, 12:24 PM
  7. Translate ~Number of days in a week to number of days across months
    By martin ridley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2008, 01:09 PM

Tags for this Thread

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