Excel equations using months [closed] - excel

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am trying to come up with an equation. Here is what I am trying to do. I am trying to get a running total by multiplying a monthly rate for renting something that will at all times keep a running total at all times. Monthly rate x month started = Running total. Keep in mind there doesn't need to be a total based on the number of days owned on a month (Not to be pro-rated in other words.) Something like if it cost $100 a month in January. Then by July 1st you would owe $600. On June 15th for example you would still only owe $500 because the month hasn't ended. In other words the running total would only show completed month totals. Maybe I don't have the best knowledge of excel but I am ok at the equations. The problem is from using months instead of simply multiplying numbers. Any help would be appreciated. Thanks.

My approach to this would be to have dates in one column like '01/Jan/2013', '01/Feb/2013' etc. then the next column would have the formula of = 100 + CellAbove

Use DateDif or Month
= DATEDIF ( start_date , end_date , "interval")
so to calc the months from January to July using Months try this
=DateDif("1/11/2013", '6/1/2013"), "M") will yield 4
=DateDif("1/01/2013", '6/1/2013"), "M") will yield 5
=Month("1/11/2013") - MONTH("6/1/2013") will yield -5
=Month("6/1/2013") - MONTH("1/1/2013") will yield 5
Substitute the References in place of my Direct Dates. i.e.
A1 = "6/1/2013"
A2 = "1/1/2013"
A3 = "=MONTH(A1)-Month(A2)"
See what works for you!
Steve

Related

vlookup with effective date/rate [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to write a vlookup formula that will
1). check for duplicates in the list and
2). if there is a duplicate, then check the dates, and pull the correct rate in the vlookup return value, depending on the date.
So for example, if Michael has a rate of $100 per hour for 7/1/2017, I can assume this is his rate until noted otherwise with an additional line. On 7/3/2017 his rate changes to $120. So for hours worked on 7/1/2017 and 7/2/2017, the rate should be $100, but on 7/3/2017 and on, the rate should be $120, or until a new line is added for Michael indicating a new rate on a specific date.
Can anyone help with this?
Thanks!
You could do something like this if you sort by name and by date descending
Note it's an array formula so you need to use Ctrl+Shift+Enter
You could do this with MAXIFS(). The multiple conditions lets you find the multiple conditions, but MAXIFS() will always return an individual value unlike SUMIFS or COUNTIFS. Place hte formula in cell F2 and fill it down
=MAXIFS('Effective Rate'!$C:$C,'Effective Rate'!$A:$A,A2,'Effective Rate'!$B:$B,"<="&B2)

Subtract hours and minutes from a time entered in Excel 2013 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I want to know the time when 12 hrs and 30 mins is subtracted from a time let us say 10:00 AM(it should display 9:30 PM). But since excel by default stores this date as 1st Jan 1990, I am getting a negative timing and excel does not display it. How do I make sure that when a time is entered in a cell,I can subtract certain hours from it and display the time in AM/PM format? PS: I tried changing it to 1904 format,but this did not help.
I think it's enough to put
=MOD(A2-B2,1)
where the first time is in A2 and the second in B2.
That will get the fraction part (the hours) and give it a positive sign which should be what you want.

Change dates to 1st of each month [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
In Excel, how can I change dates to the first of each month in a column of various dates?
For example, the date 12/13/14 needs to be converted to 12/01/14. Only the 1st of each month must appear in the column.
Please try :
=EOMONTH(A1,-1)+1
EOMONTH:
Returns the serial number for the last day of the month that is the indicated number of months before or after start_date. Use EOMONTH to calculate maturity dates or due dates that fall on the last day of the month.
Syntax
EOMONTH(start_date,months)
Start_date is a date that represents the starting date. Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Months is the number of months before or after start_date. A positive value for months yields a future date; a negative value yields a past date.
• If months is not an integer, it is truncated.
Regarding the bullet point, this means that the start_date may be a date/time serial number, where the time part is ignored by this function.
So in the example, if A1 is December 13, 2014 with the second parameter (ie -1) the result is November 30, 2014. Add one (+1) in accordance with conventional date/time serial numbering and December 1, 2014 should be returned.

Find which range a cell belongs to [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have an excel sheet with columns A and B populated with numbers, a la:
1 12
13 20
21 30
31 35
This is just as an example, in reality A and B are columns of length 50ish.
In this example, I have another column with values in it between 1 and 30. I want to write a function that returns which range it is between. Perhaps a 1 if it is between the first range (1-12) 2 between the second (13-20) etc.
This is the way the data was presented to me, if it needs to be re-arranged so be it.
Does anyone know any functions that would be useful to solve this problem? I have read that nested if statements are limited to 7 "if's" so I would need to write out a bunch of them.
Thanks folks.
As #Tim has said, =MATCH looks most suitable, without its optional third parameter, so that it “finds the largest value that is less than or equal to lookup_value.” Hence the upper bounds (right-hand column in your question) are not required for this formula. The numbers returned are the relative positions of the ‘match’ in the selected array. If your “another column with values in it between 1 and 30” is say C and starts in Row2 then =MATCH(C2,A:A) copied down is a generalisation that will only return 1, 2, 3 if the population of A:B starts in Row1. In other words, if the 1 in A is say in Row3 then I’d recommend:
=MATCH(C2,A$3:A$6)
copied down to suit.
The last number in A (ie 31) can be anything as long as it is more than the upper bound of your “between 1 and 30”.

Excel : Display hours over 24 when using TIME() [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I found many posts which say how to display hours if it exceeds 24. But in my case it doesn't work.
I have 3 cells which contain hours, minutes, seconds. In the fourth cell I used formula =TIME(E4,F4,G4) where E4 contains hours, F4 contains minutes and G4 contains seconds. I formatted the cell using
Format Cells --> Number --> Custom --> [hh]:mm:ss
. But still am not getting the correct value in the cell.
hours | minutes | seconds | Time
81 | 22 | 27.045 | 09:22:27
Expected value as Time is "81:22:27"
Is there any other formatting required?
Thanks in advance.
The Time function takes the remainder for each argument. The remainder of 81/24 is 9, which is why it is showing 9 hours. You would need to add the rest back in, like so:
=TIME(,F4,G4)+E4/24
Since your "expected value" is 81:22:27, you could just construct the time as a concatenation of the respective values:
=RIGHT("0"&INT(E4),2)&":"&RIGHT("0"&INT(F4),2)&":"&RIGHT("0"&INT(G4),2)
You will need to calculate your time differently - but format the result as [h]:mm:ss
If Hours, Minutes, Secs are in A1, A2, A3
Then in A4 use formula =DATE(0,1,A1/24)+TIME(A1,B1,C1)
Format A4 as [h]:mm:ss and that will do it!

Resources