ive been trying to break into some excel just to get a little bit familiar with the program but im a little lost on some of the prebuilt functions. Here is one of the exercises ive been attemping.
In cell B5 calculate the projected sales for January 2015. Use the Average 2014 Monthly Sales in B2 and the Growth Rate in cell B1. In cell C5, use appropriate cell referencing to calculate the projected sales for February 2015 based on the projected January sales and the Growth rate.
which function would be best suited for this ?
This would be a straight forward math problem
future amount = current amount + (current amount * percentage increase)
or simplified:
future amount = current amount * (1 + percentage increase)
in B5:
=B2*(1+B1)
Then in C5:
=B5*(1+$B$1)
And copy/drag across. The B5 reference will change appropriately and it will fill in the correct amounts across.
You want a single formula for it all:
In B5 put:
=FVSCHEDULE($B$2,INDEX(($B$1*ROW(INDIRECT("1:" & COLUMN(A:A))))/ROW(INDIRECT("1:" & COLUMN(A:A))),))
And drag across.
I prefer Scott's original answer and it works really well in in this case. I just want to expand on this as it appears to me to be a compound interest problem and finding out what the nth value of an investment is based on a fixed interest rate. So a more general equation would be:
=P*(1+i)^(n)
P - Principal or starting value
i - Interest rate for the period (not annual unless you period is annual)
n - period number, 1 for first period 2 for 2nd etc.
Scott's formula works really well because all the months are side by side and there are no gaps. This is what the OP presented to us in the example. However, if months had been missing a different approach would have been necessary.
An alternative approach using the OPs orignal setup could be:
=$B$2*(1+$B$1)^(COLUMN(A1))
B2 is the starting principal P
B1 is the interest for the period
COLUMN(A1) is a way to count the nth period as the formula is copied across.
If the date was stored in B4 and formatted to display a month, we could substitute the following for determining the nth period:
Month(B4)
Of course this assumes that the whole thing started in the first month, but an alternate form could be used to adjust the value based on a supplied starting month/date.
And of course the entire header row of month could simply be changed to an integer representing the nth period of interest
On a side note, one of the nice parts of using this method, is that it is independent of what is happening in adjacent cells. Should a column in the middle of the series be erased, you will not be faced with a series of errors.
Related
Purpose of Post
Trying to determine why the WORKDAY.INTL formula in cell "F2" of the attached workbook picture seems to be calculating the incorrect date. I expected the date be 8/16/21. It is showing as 8/12/21.
The attached picture is a screenshot of my workbook that contains a table of tasks. The columns to the right of the tasks column are explained below.
Start Date: the date that the task will be started.
Due Date: the date that the task is due/will be finished.
Hours of Work: the estimated amount of hours that it will take to complete the task.
Percent Dedication: The percentage of my time in a workday that I will dedicate to that task.
Start Date Check: Calculates the latests day you can start the task to finish on the specified due date given the hours of work required and the percent dedication.
Due Date Check: Calculates when the work will be finished if started on the specified start date given the hours of work required and the percent dedication.
Working Hours: Number of hours in each working day.
Formulas in Cells
Cell "E2": =([#[Hours of Work]]/(NETWORKDAYS.INTL([#[Start Date]],[#[Due Date]],"0000111")*J1))
Cell "F2": =WORKDAY.INTL([#[Due Date]],(-1)*([#[Hours of Work]]/([#[Percent Dedication]]*J1))+1,"0000111")
Cell "G2": =WORKDAY.INTL([#[Start Date]],[#[Hours of Work]]/([#[Percent Dedication]]*J1)-1,"0000111")
Here's your problem in it's simplest form:
Column C shows the formulas that are being used in Column B.
The formula in B3 is displaying the correct answer.
However, the formula in B4 treats B3 as though it is -11. This is almost certainly due to floating-point arithmetic, especially considering that the 10/11 part of the formula is a non-terminating number. This is much too complicated of a subject to get into, but essentially it means that the result is not -10 and is something like -10.0000000...00000004815162342 because of the slight imprecision.
The solution is to round the result to an integer, so that we ignore the tiny amount of imprecision. For our test case, we would do this:
By rounding the answer, we have obtained the correct result.
For your workbook we can do the same thing. The formula in E2 would become:
=WORKDAY.INTL([#[Due Date]],ROUND(-([#[Hours of Work]]/([#[Percent Dedication]]*J1))+1,0),"0000111")
Which gives the correct answer:
I would suggest doing the same for the formula in G2 as well, which would be:
=WORKDAY.INTL([#[Start Date]],ROUND([#[Hours of Work]]/([#[Percent Dedication]]*J1)-1,0),"0000111")
I am currently trying to create an if statement that sums values based on whether a date has passed.
Excel example image
M1 to M12 dictate the months of the year e.g. 01/01/2021 for M1 and 01/12/2021 for M12
Now I want to create or use a formula that sums the values in row 4 based on what month we are currently in --> If we are currently in M1, e.g. 15/01/2021, then it only needs to sum the value in A4. However, if we are, for example, in M3 (28/03/2021) then it needs to sum A4 + B4 + C4
I tried using the following formula but the problem is that when it finds a value larger than 01/01/2021 it doesn't take other months into consideration anymore
=IF(TODAY()>=A2;A4;IF(TODAY()>=B2;SUM(A4:B4);0))
I added the zero at the end of the function to close the formula but my idea was to prolong it up til 12 months. However, it only ever sums the first cell (A4) because conditions have already been met. How do I 'overwrite' the first condition if more months have passed?
Any help would be greatly appreciated; I excuse myself for asking potentially dumb questions but Excel isn't my strong point and I am trying to learn.
Kind regards,
VHes
Try:
=SUM(INDEX(4:4,SEQUENCE(MONTH(TODAY()))))
An alternative approach using SUMIF:
=SUMIF(A2:L2,"<"&EOMONTH(TODAY(),0),A4:L4)
If SEQUENCE is not supported by your version of excel, (based on comments it does), you could also try the following:
=SUM(A4:INDEX(A4:L4,MONTH(TODAY())))
The trick here is that INDEX actually supplies a cell address, and displays the contents of that cell when needed.
Fun situation I'm trying to calculate. Basically in one row I have names of products, and the row to the right of it the number of days that have passed since the product was first received.
The calculation to do the days for ex is
=TODAY()-BB2
What I'm trying to do NOW, is identify let's say the product word "truck," and then calculate how many days on average the holding time of truck is.
I understand the logic of the formula I need, just not how to execute precisely. Basically the formula is going to need to use this average calculator with a keyword identified COUNTIF
=COUNTIF($A$2:$A$900,"TRUCK")/COUNTA($A$2:$A$900)
What I'm missing is some type of...IF "TRUCK, OFFSET (GIVEN CELL) -1)
Thanks for any thoughts!
-Wilson
A formula (in C1 in the example):
=AVERAGEIF(A:A,"truck",B:B)
should work but I would recommend a PivotTable for the additional functionality it provides:
Not sure if I've worded the question correctly... but, I have a spreadsheet that imports data across with a 'transaction date' and on day 1 there may be 15 transactions, day 2 there may be 30 etc.
Now I already have a formula that is counting how MANY are imported each day
=SUMPRODUCT((MONTH('Further Evidence'!$A$2:$A$5000)=MONTH(DATEVALUE(Configuration!H2&" 1")))*('Further Evidence'!$A$2:$A$5000<>""))
That shows how many have come in that particular month, what I need to work out now is what the highest intake was during that month (and if possible, which day it was).
Rather than list 365 days of the year and doing a countif in every cell next to them, is there an intuitive way to only count values that exist in the list?
It will be simple for one of you, but I can't quite figure it out or what to google :)
edit -
=MAX(FREQUENCY('New Appeals'!A2:A5000,MONTH('New Appeals'!A2:A5000)))
This works for the whole list of dates, but how can I make it check months specifically, or pinpoint the specific day?
To find the max value within a given month you can use an array formula like below
I've used a sample range of rows 36 to 48. I've assumed that date is in column I and that transactions is in column J
=MAX(IF(TEXT($I$36:$I$48, "mmm")="jan", $J$36:$J$48, ""))
(To enter an array formula you have to press ctrl + shift + enter when you are in the cell)
This is restricting the MAX function to the month of jan.
You can then find the day associated to this max value by using another array formula that is a mix of first MATCH then INDEX. The MATCH first looks for the max value within the range of cells associated to the given month, then returns this position. This position is then used in the INDEX to return the date
=INDEX($I$36:$I$48, MATCH(K34, IF(TEXT($I$36:$I$48, "mmm")="jan", $J$36:$J$48, "")))
Please note that if you have two days within a month with the same max then it will just bring back the first one
Hope this helps
UPDATE 1:
This is what I am trying to do.
B1, B2, and B3 represent 3 containers
Period could be anything, days, weeks, months years, so Period 1, can mean day 1, or week 1, or month 1 or year one.
In period 1, I start off with the value 100. 60% of 100 always gets added to B1 (container 1), and 40% of 100 always gets added to B2 (container 2). B3 (container 3 does not get a percentage of 100. This happens on every period.
After the first period, i.e. period 2, B1, B2, and B3 all get 10% of the value of the previous B2 values divided by 3. So each container gets 1.33 in this example. However, B1 also gets another 60% of 100 added to it making the total 61.33 and B2 gets another 40% of 100 added to it making the total 41.33.
In the next period, period 3, again 10% of the values from B2 above period 3 divided by 3, i.e. ((40+41.33)*0.10)/3 gets added to all cells in period 3, then for B1, add another 60% of 100, and B2 get another 40% of 100.
ORIGINAL QUESITON:
I have the following spreadsheet which uses some basic formulas.
https://spreadsheets.google.com/spreadsheet/ccc?key=0Al-CN3-vjUYvdEdNMU4zN3FTNF9VZlMzZXBTcjh0Mnc&hl=en_US#gid=0
As you can see this goes from period 1 to 12. Is it possible to create a formula for columns B1, B2, and B3 to get the values based on the period? So, for example, if the formula was working, I would be able to simply type in 5 to get:
B1 = 65.61
B2 = 45.61
B3 = 5.61
Used = 500.00
If I type in 100 as the period, it should return the correct values, instead of creating 100 rows with the appropriate formulas per cell, which would take ages to do.
Does anyone know how to create the required formulas?
As shown online in your spreadsheet, you can use SUMIF:
For B1:
=SUMIF(C2:C13;A4;D2:D13)
And so on for B2, B3 and Used.
EDIT
I solved your issue on another Sheet of your Google Doc.
Needed some maths to found out which kind of sequence this was in order to sum up each element to the n-th one.
This was done for column E (meanly title B2):
=$A$2*$I$8*POWER($I$2/3+1;C2-1)
And then adapted to fit B1, B3 and Used, wasn't that easy...
For Ease Why dont you convert
=(((E2+E3+E4+E5+E6+E7+E8+E9+E10+E11+E12)*I2)/3)+(A2*I5)
to
=((SUM(E2:E12)*I2)/3)+(A2*I5)
Before all this math stuff isn't my best Art, but I figure out the answer anyways
Well, even when you can macro your function, some understanding of the formulae can help to a simpler answer:
First, the key column is B, if you analize his result you will identify this as a ''series'' (the math stuff, link to wikipedia here), checking of the results are calculated yield the followin table:
please, don't force to explain, because isn't my best area of expertise, but this is the solution (use a scientific calculator or mathematica to check this out), using this formulae you getthe value of the B column.
So, Column A and C, how we get it? A quick inspection show the following:
A=B+20
C=B-40
I hope this solves your question
Best Regards
Alen