In the below link.
I am using cross tab for calculation.
For last column [Measure1/Measure2] column, the Subtotal value must be 467243.62 but the value is incorrect. But for other two columns having the desired sub total value.
I need to consider the [Measure1/Measure2] subtotal for further calculation.
[Measure1] is sum of column1
[Measure2] is sum of column2
[Measure1/Measure2] is sum(Column1)/Sum(column2)
So, Please help me to get it resolved.
Thanks in advance.
Change your formula to:
sum([Column 1]/[Column 2])
so the division is performed before the sum.
Related
I have this table in excel
I want to create a new column where if have a total score let's say of 92 I do an index/match on the table and get it.
I tried this
=INDEX('Risk Assessment Matrix '!I24:I28,1,1,MATCH(111,'Risk Assessment Matrix '!J24:J28,0))
but not working.
Any help please?
Thanks,
Ilias
Assuming a value given is not above 140, you don't even need a 3rd column. Try:
Formula in D2:
=INDEX(A1:A5,MATCH(D1,B1:B5,-1))
If D1 happens to be above 140 an error is returned. You can catch that by nesting the above in =IFERROR(<TheAbove>,"No Match") for example.
Reorder the list so the third column is ascending not descending. and change the >=0 to just 0
Then use:
=INDEX('Risk Assessment Matrix '!I24:I28,MATCH(111,'Risk Assessment Matrix '!K24:K28))
Your INDEX/MATCH looks a bit odd. You wouldn't normally have the "1,1," in there.
Try this:
=INDEX('Risk Assessment Matrix '!I24:I28, MATCH(111,'Risk Assessment Matrix '!J24:J28,0))
This should return "High" (assuming your first column in the table is "I".
Two methods shown:
Pay attention to the order.
An alternate option is the use the new XLOOKUP function.
Although it would require changing the minimum value range from 0 to -9999. An out of range value for non-numeric values of 9999 would also need to be added.
It has the advantage of being easier to read compared to INDEX and MATCH.
=XLOOKUP($D2,$B$2:$B$6,$A$2:$A$6,"Not Found",-1)
The formula looks up the value against a single list of minimum values.
The match_mode (last parameter) is set to -1. This means perform an exact match and if nothing is found return the next smaller item.
How can I find the minimum value in columns B:C in the table below if the volume is <= 10.
The expected result is in yellow.
Regards,
Elio Fernandes
Either:
=AGGREGATE(15,6,C2:C9/(A2:B9<=10),1)
or, array formula**:
=MIN(IF(A2:B9<=10,C2:C9))
If there may be blank cells in B2:C9:
=AGGREGATE(15,6,1/(1/C2:C9)/(A2:B9<=10),1)
or:
=MIN(IF(A2:B9<=10,IF(ISNUMBER(C2:C9),C2:C9)))
Regards
You can use this formula to get the minimum value (Which according to me should be 20 in your data set)
=MIN(1/AGGREGATE(14,6,1/((A2:A9<=10)*B2:B9),1),1/AGGREGATE(14,6,1/((A2:A9<=10)*C2:C9),1))
for each additional column(say D) you will have to add the formula 1/AGGREGATE(14,6,1/((A2:A9<=10)*D2:D9),1) inside the MIN() formula.
Looking for a better way to do this.
EDIT:
Alternatively you could add a new row below your data. for each column you add the below formula to get the min for that column
=1/AGGREGATE(14,6,1/(($A$2:$A$9<=10)*B2:B9),1)
Now you can drag this formula to as many columns you want. Take the MIN() of this row to get the overall minimum.
I have a student's result sheet, where I calculated the total number the student has gained. Next, I want to rank them according to the grand total, and wherever it duplicates, the student getting more number in maths(E9:E58) will be given priority,
How to accomplish it?
I have my grand total from U9 to U58, and maths score in d9 to d58.
I have used this formula:
=Rank(u9,u9:u58,1)
I am stuck in how to use the if condition within the rank function.
Please help.
Thanks in advance....
In that sort of situation, one method of adjusting is to use the SUMPRODUCT function. You will need to adapt my example to your data ranges. In the example below, you don't need columns E:F. They are only there so you can better see how the adjustment is accomplished.
Adjustment Function:
=SUMPRODUCT((C2=Totals)*(B2>Maths))
adj Rank Function
D2: =RANK(C2,Totals,1)+SUMPRODUCT((C2=Totals)*(B2>Maths))
Assuming, Total score is in Column U and Math's score is in Column E, you can use Ron's solution as:
=RANK(U9,U$9:U$58)+SUMPRODUCT((U$9:U$58=U9)*(E$9:E$58<E9))
Enter above formula in 9th row of the column where you want Rank to be displayed and then drag/copy it down till 58th row.
This is more of arithmetic approach. I would add a column called adjusted total.
AdjTotal = Total + (Maths Score / Max possible Maths Score) * 0.9
Then use this Adjusted score column to rank.
The adjustment will add a fraction under 1 to the total and will help break the tie when there is one. Since the adjustment will never be more than 0.9 it will not affect ranks when there is no tie.
Assuming Max score for Maths is 100, use this
V9 = U9 + D9/100*0.9
Copy V2 down till V59
W9 = RANK(V9, V$9:V$59, 1)
Copy W9 down.
You can do this by running the usual RANK() method and then adding in the RANK() method on a filtered set that matches the other rows tied with the current row. Since the RANK() call for the tiebreak will start at one you will need to subtract one to compensate.
The end result ends up looking like:
=RANK(U9, U$9:U$58, 1) + RANK(D9, FILTER(D$9:D$58, U$9:U$58=U9)) - 1
I need to sum the data points (vlookup points) in above cells for a variable number of data rows. Each sum location is separated by a blank row in the report. I am getting an error in the Index portion of the formula to complete the sum.
The sum should be for all data points above when there is a data point in column C directly to the right. Is there an adjustment I need to make to the sum function or do I have the sum approach all wrong?
The third fourth and fifth data series have the sum manually entered to show what I need. Please let me know if you need any more information. Thanks for your help!
"=IFERROR(IF(C3<>"",SUM(B1:INDEX(B:B,MATCH(TRUE,INDEX(B2:$I$998="",0),0))),VLOOKUP(A3,'[179821 Invoice Status Report.xls]Subcontract Invoices'!$A$8:$AB$506,4,FALSE)),"")"
Sum Above Example
The range in your INDEX needs to be a single column. So if you change $I$998 to $B$998 it should work.
I would like to know how to add a weighted average in my pivot table. In fact, I need to do the following calculation: SUM(col1 * col2)/SUM(col2).
I tried to do it by using the calculated field option but when I enter my formula, I just have the following result as an output: SUM((col1 * col2)/col2) which is equal to SUM(col1).
You will need 1 calculated field, and 1 helper column
Helper Column
col3=col1*col2
Calculated field:
CF=Col3/Col1
If you try to do the helper column as a calculated field, it will sum col1 and col2, then multiply them together which results in a meaningless answer
Given you are after the Excel Pivot table version of a weighted average, I think you might find this article useful:
http://excelribbon.tips.net/T007129_Weighted_Averages_in_a_PivotTable.html
The only thing it doesn't mention is what to do if your weighting sums to zero (in which case you will divide by zero). To avoid that ugliness you can use your Pivot table's DisplayErrorString and ErrorString properties, e.g.
oPivot.DisplayErrorString = True
oPivot.ErrorString = "--"
Though obviously that may hide real errors elsewhere in your Pivot table.
Try to use
=SUMPRODUCT(A1:A6, B1:B6)/SUM(B1:B6)
This article may help you: Calculate Weighted Average in Excel by Ted French