I want to use the command MEDIAN in Excel but I want to make the program so that it takes the value in a column from 1 to a row that depens on a calculation in a different column and row.
For example:
=MEDIAN(G1:G(L1))
where L1 is a calculted value
The calculated value in L1 will vary and therefore this procedure will repeat itself for many couple of times. Therefore, I don't want to write the number (of G) direct into the MEDIAN-function.
Please help me! :)
If I understand it corerctly you want to write a formula that calculate the median for a specific column, but you only want to calculate it from values in the range G1:X, where X is another cell in column G, which you calculate based on some criteria. If so then this would solve it:
=MEDIAN(G1:(INDIRECT(ADDRESS(X;7))))
Where X is your formula that calculates which row, i.e. cell is the last to be included in the column G.
Try this formula.
=MEDIAN($G$1:(INDIRECT(ADDRESS($L$1,COLUMN($G$1)))))
Related
Say I have the following numbers in cells in suceeding rows of column B 1,24,23,12,15,17. How do I get Excel to only add up to that cell so that the sum equals a predefined number (say 25) and return the corresponding row number at which this condition is satisfied?
In the example above, it should add B1 and B24 whose result equals the predefined number (25) and return row 2 as a result.
The challenge is unlike SUMIF and similar commands, I cannot prescribe a range B1:B6 or so. Instead of B6 it should be some number Bx where x (2 in this case) is decided on the fly. Does that make sense?
Thanks in advance.
You cannot do it with a single formula, but you can do it by adding a column with running totals. See this code example:
Is there a way to write this using formulas.
=Max(a, a+b, a+b+c, a+b+c+d, a+b+c+d+e+...)
I don't want to use VBA for this task and I am not sure how to approach this problem.
Excel sheet expanded with formula
Excel sheet contracted without formula
Objectives:
1) For each of the peoples, (Bill, Ben, Katy), I would like to compare the maximum of the sum of only X through time.
For example, in Column J, I would like to know the current Max of the sum of X. Current is the date 1/17/19 because it is the most recent entry.
2) For each of the peoples, (Bill,Ben, Katy), I would like to compare the max of the previous entry to the max of my most recent entry.
For example, in Column K, I would like to compare the Max of the sum of X at 1/5/16 to the max of the sum of X at 1/17/16.
3) I would like Column J and K to recalculate as I bring in new data entries into Column I. As of now, using a solution mentioned below, in Column J, I think I would be using something like this formula:
=MAX(MMULT(0+(ROW(B9:I9)>=TRANSPOSE(ROW(B9:I9))),B9:I9)
This solution seems to work if I only have X's going down vertically though.
Also, as new data gets brought in, Column J and K would be pushed to the right, becoming Column K and L.
4) The highlighted region in Column I and J are my output sections that are dependent on the date of Cell B1.
For example, if I were to change the date to 1/1/2016 in Cell B1, Cell I7 would equal -4 Cell J7 would equal True.
If I were to change the date to 1/17/16 in Cell B1, Cell I7 would equal 5 and Cell J7 would equal True.
I've been playing around with this a bit, trying to use SUMIFS to pick up sum of X based on a date criteria.
I thank everyone in advance for all your help, and I apologize if my wording to this problem is unclear. I am a undergraduate student, and have no background in computer/programming/anything of that sort at all. Thank you so much!
Assuming a, b, c etc are in a column, then a standard approach will be to use an additional column with a cumulative sum of the values in the input column. Then you can just take the MAX of the column with the cumulative sum.
E.g. use of cumulative sum in column B with the input values in column A:
With MAX formula in column C:
Assuming data in A1:A5, you can use this array formula**:
=MAX(MMULT(0+(ROW(A1:A5)>=TRANSPOSE(ROW(A1:A5))),A1:A5))
which, due to its being non-volatile, is preferable to:
=MAX(SUBTOTAL(9,OFFSET(A1:A5,,,ROW(A1:A5)-MIN(ROW(A1:A5))+1)))
Regards
**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
I have a table in excel that can be seen below.
I want to choose the highest number in the "RPD" row and multiply it with the values that are in the same column.
So in this case the formula would take July column and multiply all the values there.
The problem is that I want to do this automatically, so when the order of values in "RPD" row changes the calculation changes automatically, still chooses the highest value in "RPD" row and multiplies it with all the values in the same column.
I also want to do this for the second highest value and so on...
So I would end up with a new row where the first column has the values for july multiplied and so on.
Thanks in advance.
You may need to use the =LARGE(matrix, k) function; where matrix will be the RPD numbers and K-esim largest number. And fix the range of your matrix.
Change MAIOIR to LARGE (i'm using it in pt_BR).
For the 1st one, the formula will be:
=LARGE(C5:N5; B9)*C4*C6
Then will have to lock the parameters by using $
=LARGE($C$5:$N$5; $B9)*C$4*C$6
Output:
I am trying to come up with a formula that possibly uses the sumproduct function combined with another function.
Let me start by explaining what I have and what I want. If I have a list of 3 product numbers or more in a column, I would like excel to find the product numbers in 2 different possible columns and if they are listed there, I would like excel to multiply and sum.
I am currently using this formula:
=SUM(SUMPRODUCT(($B$27:$B$46='Lists for Estimates'!K2)*($E$27:$E$46*$A$27:$A$46))
+SUM(SUMPRODUCT(($F$27:$F$46='Lists for Estimates'!K2)*($I$27:$I$46*$A$27:$A$46)))
+SUM(SUMPRODUCT(($B$27:$B$46='Lists for Estimates'!K3)*($E$27:$E$46*$A$27:$A$46))
+SUM(SUMPRODUCT(($F$27:$F$46='Lists for Estimates'!K3)*($I$27:$I$46*$A$27:$A$46)))))
The issue with this is I have to continue to add to the formula if I add more to "Lists for Estimates." I would like to change the formula from 'List for Estimates'!K3 and K2 to search the entire column.
Thank you in advance!
Create a new column on your data sheet that multiplies the A and E columns together (so the formula doesn't have to do it), and then use this formula:
=SUMPRODUCT(SUMIF($B$27:$B$46,'Lists for Estimates'!$K$2:$K$3,$F$27:$F$46))
Where column F contains the multiplied values. Adjust column F to suit your actual data. The multiplied value column can be hidden if preferred, or even put on a different worksheet.
I'm having an issue getting accurate data from the SUMIF function. This appears to be caused by the SKU and Product name being identical however I don't understand why the selected range would be ignored.
SUMIF(G:K,A2,K:K) - Cell D2 is calling for the sum of K yet returning the sum result of K2:M2. All other results in D are correct.
SUMIF(G:K,A2,I:I) - If I change the formula in D to SUM I:I (text not a numeric field) the function returns the sum of K:K
Example file http://tempsend.com/013C2B6378
According to the documentation here the range to be summed starts at the top left of the sum range (K:K in your first example) but its size is given by the size of the criteria range (G:K in your example). So I think that's why you're getting extra columns summed in your result.
If you have multiple criteria involving different columns, you should be able to use SUMIFS.
So let's say your data sit in 8 rows (including the headings).
then you simply need to change your formula to say, look for B2 in column G OR in I, if true, then sum the values in K. Right?
put this formula in B2 and press ctrl+shift+enter to calculate the formula.
=SUM(IF(($G$2:$G$8=B2)+($I$2:$I$8=B2),1,0)*$K$2:$K$8)
then drag and fill down until the last cell.
obviously you need to adjust the ranges in the formula to adapt to your own data.
tell me if you get to the answer via this.