ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Calculating towards a target number (https://www.excelbanter.com/excel-worksheet-functions/198028-calculating-towards-target-number.html)

Mary

Calculating towards a target number
 
Dear Excel Expert,
I am trying to figure out a formula for a prison length. I have a set
sentence length which is a number of months (format 00.0), for example, 5
months. I want to give the prisoner a credit of 5 days a month (.1645/day).
If I multiply 5 months x 5 days, the prisoner will get 25 days credit. This
is not correct, because the prisoner is released after 5 months with no
credit. The credited time has to be calculated so that he is released before
5 months. I don't know how to get the number of months to calculate the 5 day
credit for this - DO YOU? THANK YOU!!!!!!



Peo Sjoblom[_2_]

Calculating towards a target number
 
With your start date in A1

=TEXT(EDATE(A1,5)-(5*5),"mm/dd/yyyy")

if you want to use a cell reference when you put the number of months,
assume B1


=TEXT(EDATE(A1,B1)-(B1*5),"mm/dd/yyyy")

--


Regards,


Peo Sjoblom

"Mary" wrote in message
...
Dear Excel Expert,
I am trying to figure out a formula for a prison length. I have a set
sentence length which is a number of months (format 00.0), for example, 5
months. I want to give the prisoner a credit of 5 days a month
(.1645/day).
If I multiply 5 months x 5 days, the prisoner will get 25 days credit.
This
is not correct, because the prisoner is released after 5 months with no
credit. The credited time has to be calculated so that he is released
before
5 months. I don't know how to get the number of months to calculate the 5
day
credit for this - DO YOU? THANK YOU!!!!!!





Mary

Calculating towards a target number
 
Thank you very much, but I don't have any dates, just a spreadsheet with
months and days. I am trying to figure out how many prisoner days I can save
with implementing a monthly jail credit. I have a frequency table of the
number of prisoners for respective months of sentence length.

"Peo Sjoblom" wrote:

With your start date in A1

=TEXT(EDATE(A1,5)-(5*5),"mm/dd/yyyy")

if you want to use a cell reference when you put the number of months,
assume B1


=TEXT(EDATE(A1,B1)-(B1*5),"mm/dd/yyyy")

--


Regards,


Peo Sjoblom

"Mary" wrote in message
...
Dear Excel Expert,
I am trying to figure out a formula for a prison length. I have a set
sentence length which is a number of months (format 00.0), for example, 5
months. I want to give the prisoner a credit of 5 days a month
(.1645/day).
If I multiply 5 months x 5 days, the prisoner will get 25 days credit.
This
is not correct, because the prisoner is released after 5 months with no
credit. The credited time has to be calculated so that he is released
before
5 months. I don't know how to get the number of months to calculate the 5
day
credit for this - DO YOU? THANK YOU!!!!!!







All times are GMT +1. The time now is 02:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com