I'm trying to create a dynamic rolling 12 month cash flow in Excel.
Lets say the month name is in cell A1.
Underneath cell A1 l have a list of cash flow expenses in my rows and the expenses listed in the columns by month. I have a separate column at the end that totals up 12 months of expenses based on the month name (in cell A1).
So, if cell A1 says Jun-18, l want to add up the expenses for each row item from Jun-18 to May-19. OR say, if cell A1 says Sep-18, l want to add up the expenses for each row item from Sep-18 to Aug-19.
I don't know how to do this, can anyone please advise.
Thanks for your help,
M
You can use sum ofset match
Given the example data below (as I think that you have described in your question), you can use the the following formula (this example the formula result is showing in B2) A1 contains the start date to calculate from.
=SUM(OFFSET(A2,MATCH(A1,A2:A100)-1,4,12,1))
You will need to research how ofset works, as I currently do not have time to explain, but to help you use this formula within your worksheet you will need to change the number 4 which is 4th column away (column E containing the months totals) from the matched date.
The 12 in the formula shows how many rows down you want to sum.
A B C D E
1 Jul-18 8638.21
2 Expence1 Expence2 Expence3 Total
3 Jan-18 1 1 1 3
4 Feb-18 2 2 2 6
5 Mar-18 3541 531 51 4123
6 May-18 100000 31 351 100382
7 Jun-18 846 8 321 1175
8 Jul-18 1 153 12 166
9 Aug-18 0 8 21 29
10 Sep-18 0 65 8 73
11 Oct-18 54 321 1 376
12 Nov-18 321 123 1 445
13 Dec-18 1 321 2 324
14 Jan-19 546 0 51 597
15 Feb-19 132 51 15 198
16 Mar-19 12 321 51 384
17 Apr-19 51 123 321 495
18 May-19 5161 3.21 351 5515.21
19 Jun-19 21 3 12 36
20 Jul-19 321 1 1351 1673
Related
So I have a set of Data having 6 columns under different headers.
In sheet 2 we select some variables from Data sheet (to perform sum operation in this case).
Whenever the user inputs some or all variables (Fruits, Veggies, Drinks, Snacks, Vegan, Dairy)from Data (sheet1) in to sheet 2 for items_chosen under Formula column (e.g Veggies + Drinks + Vegan) , then the output column(sheet 2) should display sum total of these selected columns, under Results.
example: We chose, (Veggies + Snacks + Dairy) ;
Now total of each of these columns are 1222(veggies) , 1927(snacks) , 328(dairy) ;
So in sheet 2 under result ,it should display = 3447 which is the sum total of [1222(veggies) + 1927(snacks) + 328(dairy)]
I know we can use Indirect function in excel but how can I take input from what is written in Choose Variables here column in sheet 2
Sample Data:
Fruits
Veggies
Drinks
Snacks
Vegan
Dairy
1
3
9
7
8
4
23
31
26
34
71
45
45
51
93
72
353
41
67
134
56
81
431
155
89
42
242
457
513
19
111
61
574
541
54
15
133
46
426
156
135
17
155
522
264
166
351
18
177
332
624
413
54
14
Output:
Label
Choose Variables here
Output
Result
Items_chosen
Veggies + Snacks + Dairy
Result of Items_chosen
Try below formula.
=SUMPRODUCT((A2:F10)*(ISNUMBER(SEARCH(A1:F1,I3))))
How can I get a chart in Excel with:
x-as is equal to the combination of JM and location
y-as are the %-values from Occupied next or on top of empty
So in month 201801 I can see the 2 (or more max 30) locations with both %-values
next to month 201802 and so on.
(Eventualy I can set a trendline on Occupied)
Hopefully my question is clear
The is a short example table:
JM location Occupied% Empty%
201801 A 80 20
201801 B 54 46
201802 A 64 36
201802 B 89 11
201803 A 50 50
201803 B 89 11
201804 A 99 1
201804 B 67 33
201805 A 100 0
201805 B 78 22
201806 A 98 2
201806 B 86 14
201807 A 93 7
201807 B 58 42
201808 A 67 33
201808 B 79 21
201809 A 67 33
201809 B 57 43
201810 A 98 2
201810 B 97 3
201811 A 65 35
201811 B 68 32
201812 A 87 13
201812 B 99 1
Very easy with a pivottable. Select Insert, Pivottable and drag JM to the row field area and Location to the column field area and Occupied to the sigma area. Then insert a line pivot chart.
I've got a headache which I would love some help with
So I have the following table:
Table 1:
Date Hour Volume Value Price
10/09/2018 1 10 400 40.0
10/09/2018 2 80 200 2.5
10/09/2018 3 14 190 13.6
10/09/2018 4 74 140 1.9
11/09/2018 1 34 547 16.1
11/09/2018 2 26 849 32.7
11/09/2018 3 95 279 2.9
11/09/2018 4 31 216 7.0
Then what I wan to do is view the weighted average by hour.
e.g.
Hour Price
1 21.52272727
2 9.896226415
3 4.302752294
4 3.39047619
And if possible (bonus point). Then be able to change this by time period e.g. each hour within specified dates.
The way it looks in Excel:
A B C D E
1 Date Hour Volume Value Price
2 10/09/2018 1 10 400 40.0
3 10/09/2018 2 80 200 2.5
4 10/09/2018 3 14 190 13.6
5 10/09/2018 4 74 140 1.9
6 11/09/2018 1 34 547 16.1
7 11/09/2018 2 26 849 32.7
8 11/09/2018 3 95 279 2.9
9 11/09/2018 4 31 216 7.0
The output should be:
Hour Price
1 21.52272727
2 9.896226415
3 4.302752294
4 3.39047619
Calculated Like:
Hour Price
1 ((E2*C2)+(E6*C6))/SUM(C2,C6)
2 ((E3*C3)+(E7*C7))/SUM(C3,C7)
3 ((E4*C4)+(E8*C8))/SUM(C4,C8)
4 ((E5*C5)+(E9*C9))/SUM(C5,C9)
I've looked at lots of weighted average questions and answers and they all make sense but I can't quite put them together the way I want.
I hope that makes sense.
Thanks guys,
I have reproduced your desired report:
There is no need to involve price in the calculations. Weighted Average price is simply total value / total volume, for the selected set of dates. Let's say your table is called "Data". Create measure:
Weighted Average Price = DIVIDE( SUM(Data[Value]), SUM(Data[Volume]))
Put it into a pivot table against hours, and you are done.
The formular will work correctly for any set of dates you select. For example, in a version of the above report with both hours and dates on pivot:
you can see that it calculates prices correctly on individual dates, subtotals and the total.
I have below table
Month LoB Score Rank
Jan A 1
Jan B 2
Feb B 1
Feb B 2
Jan A 2
Mar C 1
Feb A 3
Jan A 3
Mar C 2
Mar A 1
Mar C 3
I want to Rank the scores basis Month and LoB. For ex in Jan for A whatever is highest will get Rank 1. Similarly in Jan for LoB B whatever is highest will get Rank 1.
I understand that Index and Row formula are to be used in conjunction with Rank.eq but i am unable to put it together at all. I would appreciate any help on this.
Thank you
Assuming Row1 is the header row and actual data lies in the range A2:C11, then try this...
In D2
=SUMPRODUCT(($A$2:$A$11=A2)*($B$2:$B$11=B2)*($C$2:$C$11>C2))+1
and copy it down.
AoA / Good morning
by using Rank formula problems face in correct position.=RANK(K5,K5:K34)
Marks Position total marks 350
obtained
290 29
346 9 (student obtained 346 marks how he have 9th position he must be 4th position)
250 30
343 20
345 13
342 21
334 26
346 9
345 13
346 9
346 9
348 5
350 1
349 3
335 24
345 13
335 24
348 5
339 22
295 28
350 1
345 13
348 5
344 18
345 13
338 23
347 2
349 3
297 27
Column A are dates and B & C are Measurements
Dates Measurements
1 56 15
2 45 25
3 62 76
4 15 42
5 165 56
6 16 79
7 45 46
8 47 79
9 24 47
10 12 14
11 147 47
12 195 19
13 443 79
14 642 43
15 462 75
16 156 87
17 794 49
Start Date:2
Measurement:45
Code used to solve for the measurement
=VLOOKUP(B21,A2:C18,2,FALSE)
end date:14
Measure:642
=VLOOKUP(B22,A2:C18,2,FALSE)
I used vlookup to find me the values that I desire, but now I want to find the median values of that range from the start to end date in each column.
How can I code it so that once it selects the values, it can select the whole range and find the median values?
Since your column A values are ordered ascendingly, we can use the very efficient:
=MEDIAN(INDEX(B2:B18,MATCH(B21,A2:A18)):INDEX(B2:B18,MATCH(B22,A2:A18,0)))
Regards