I'm trying to use AGGREGATE function as MIN to choose the largest and the smallest number in one column. Because AGGREGATE can also ignore the DIV/0 during this progress.
Apple1 | weight | 1.2
Apple1 | height | 0.5
Apple1 | price | 1
Apple2 | weight | DIV/0
Apple2 | height | 1.1
Apple2 | price | 1
Apple3 | weight | 1.1
Apple3 | height | 0.8
Apple3 | price | 1
And here is my code:
=AGGREGATE(15;3;(B1:B9="weight")*(C1:C9);1)
But when I try to use MIN to choose the smallest in the positive results or use MAX to choose the biggest in the negative results, the search result is always 0 but not the "correct" one. In the example above, it should be 1.1, but it gives me 0.
With AGGREGATE, only a function parameter of 14 or greater is compatible with an array parameter which is not a worksheet range (or else some construction which resolves to a worksheet range).
However, since the combination of function parameter 15 (SMALL) with k parameter 1 is equivalent to finding the minimum, you should employ this version, viz:
=AGGREGATE(15;3;C1:C9/(B1:B9="weight");1)
Regards
Related
I am having a small issue with writing a formula. I have my data in this format :
NAME | EXP | SALARY
A | 0.3 | 40000
B | 4.7 | 490000
C | 2.6 | 220000
D | 3.9 | 34000
E | 1.3 | 150000
F | 3.2 | 300000
G | 0.8 | 90000
H | 1.9 | 170000
I | 2.1 | 260000
J | 4.1 | 390000
this is what i want in my output :
EXP-RANGE | MIN SALARY | MAX SALARY
0-1
1-2
2-3
3-4
4-5
i want to find the minimum and maximum salary of people in the experience range
i tried using MIN(IF(<&>)) but it returns #VALUE?
i can also push all this data in to a Database and query it but I would greatly appreciate anyone who could formulate it so that i can work on Excel itself. Data size is 20000+ so i wouldn't prefer filters
Thanks in advance
Use MAXIFS and MINIFS:
=MINIFS(C:C,B:B,">="&LEFT(G2,FIND("-",G2)-1),B:B,"<"&MID(G2,FIND("-",G2)+1,LEN(G2)))
=MAXIFS(C:C,B:B,">="&LEFT(G2,FIND("-",G2)-1),B:B,"<"&MID(G2,FIND("-",G2)+1,LEN(G2)))
If one does not have MAXIFS or MINIFS we can use AGGREGATE:
=AGGREGATE(15,7,$C$2:$C$11/(($B$2:$B$11>=--LEFT(G2,FIND("-",G2)-1))*($B$2:$B$11<--MID(G2,FIND("-",G2)+1,LEN(G2)))),1)
=AGGREGATE(14,7,$C$2:$C$11/(($B$2:$B$11>=--LEFT(G2,FIND("-",G2)-1))*($B$2:$B$11<--MID(G2,FIND("-",G2)+1,LEN(G2)))),1)
AGGREGATE is an array type formula and the references should be limited to the data set.
Assume "Lookup table" put in A1:C11
Criteria with header in G1:G6
In H2 (Min wage), formula copied right to I2(Max wage) and all copied down:
=AGGREGATE(14+(COLUMN(A1)=1),6,$C$2:$C$11/($B$2:$B$11>=IMREAL($G2&"i"))/($B$2:$B$11<-IMAGINARY($G2&"i")),1)
Edit : In convert the criteria "0-1" to complex number "0-1i", the IMREAL() extract the left side number "0", and the IMAGINARY() extract the right side number "1"
=AGGREGATE(14+(COLUMN(A1)=1),6,..., return in Column K =AGGREGATE(15,6,….) and column L =AGGREGATE(14,6,….)
I'm working on a quality control table and I just want to use MAX function to do some statistical calculation. For example:
Apple1 | weight | 1.25
Apple1 | width | 0.6
Apple1 | height | 0.8
Apple2 | weight | 1.3
Apple2 | width | 0.75
Apple2 | height | DIV/0
Apple3 | weight | 1.1
Apple3 | width | DIV/0
Apple3 | height | 0.6
If I want want to see the haviest apple in these 3, then here is my code:
=MAX(IF(Data!$B:$B=MSA!E7;Data!$C:Data!$C))
I compare the title of each test and find the Max test's result for each rest. But I meet always the N/A error. It seems that the results that I've put into the table are not all "number" that MAX can compare. there is DIV/0 in some cells.
I've tried to change the Attributes of the result column like:
=MAX(1*Data!$C:$C)
=MAX(--Data!$C:$C)
But it doesn't work either. I don't know how to avoid to count on the non-digital cells and only do the MAX with the numbers.
The AGGREGATE function can be asked to ignore errors while producing a LARGE. A LARGE function with a k of 1 is a MAX function.
=AGGREGATE(14, 6, (Data!Y8254:Data!Y8716)/(Data!T8254:Data!T8716=MSA!E7), 1)
'might better like this; you do not need to double up the worksheet in a range
=AGGREGATE(14, 6, (Data!Y8254:Y8716)/(Data!T8254:T8716=MSA!E7), 1)
Here's the scenario. I have a large spreadsheet of candidates for NHS at my school that are given a score by several teachers, community members, etc. I average out their score and then based on that number they are given a score/value from a rubric. I am looking for a formula that will read the value of cell X (their average score) and display a specific value in cell Y(their rubric score). The following is the criteria:
value<2.0, display 0
value>2.0 value<3.0, display 1
value>3.0 value<3.5, display 2
value>3.5 value<3.75, display 3
value>3.75, display 4
I tried looking this up and the closest I found was a formula that I modified to look like this:
=IF(I10="AVERAGE_CHARACTER",IF(I10<2,0,IF(AND(I10>2,I11<3),1,IF(AND(I10>3,I11<3.5),2,IF(AND(I10>3.5,I11<3,75),3,IF(I11>3.75,4,0))))))
All it says is FALSE in the cell. Not sure if I'm using the wrong formula or have a typo in the formula. Thoughts? If there is an alternate or easier method, I'm open for suggestions.
Thanks!
source: http://www.excelforum.com/excel-formulas-and-functions/575953-greater-than-x-but-less-than-y.html
It's easy if you keep the thresholds and the rubric in separate arrays:
=LOOKUP(A1,{0,2,3,3.5,3.75},{0,1,2,3,4})
You might use something like: (value to be changed in A1)
=VLOOKUP(A1,{0,0;2,1;3,2;3.5,3;3.75,4},2)
or having a table like this: (value to be changed in C1)
| A | B |
1 | 0 | 0 |
2 | 2 | 1 |
3 | 3 | 2 |
4 | 3.5 | 3 |
5 | 3.75 | 4 |
=VLOOKUP(C1,A1:B5,2)
I have a column of values in Excel that I need to modify by a scale factor. Original column example:
| Value |
|:-----:|
| 75 |
| 25 |
| 25 |
| 50 |
| 0 |
| 0 |
| 100 |
Scale factor: 1.5
| Value |
|:-----:|
| 112.5 |
| 37.5 |
| 37.5 |
| 75 |
| 0 |
| 0 |
| 150 |
The problem is I need them to be within a range of 0-100. My first thought was take them as percentages of 100, but then quickly realized that this would be going in circles.
Is there some sort of mathematical method or Excel formula I could use to handle this so that I actually make meaningful changes to the values, such that when these numbers are modified, 150 is 100 but 37.5 might not be 25 and I'm not just canceling out my scale factor?
Assuming your data begin in cell A1, you can use this formula:
=MIN(100,A1*1.5)
Copy downward as needed.
You could do something like:
ScaledValue = (v - MIN(AllValues)) / (MAX(AllValues) - MIN(AllValues)) * (SCALE_MAX - SCALE_MIN) + SCALE_MIN
Say your raw data (a.k.a. AllValues) ranges from a MIN of 15 to a MAX of 83, and you want to scale it to a range of 0 to 100. To do that you would set SCALE_MIN = 0 and SCALE_MAX = 100. In the above equation, v is any single value in the data.
Hope that helps
Another option is:
ScaledValue = PERCENTRANK.INC(AllValues, v)
In contrast to my earlier suggestion, (linear --- preserves relative spacing of the data points), this preserves the order of the data but not spacing. Using PERCENTRANK.INC will have the effect that sparse data will get compressed closer together, and bunched data will get spread out.
You could also do a weighted combination of the two methods --- give the linear method a weight of say 0.5 so that relative spacing is partially preserved.
My set up is fairly simple. I have paired data where one column is time and the next is a value corresponding to that time point. This recurs for many trials with each trial having a different number of time points
Time Freq
0.216 0.000
0.423 4.835
0.620 5.067
0.784 6.108
0.971 5.355
1.156 5.395
1.311 6.470
1.433 8.170
1.575 7.034
1.752 5.673
1.925 5.758
2.077 6.602
2.180 9.675
2.363 5.477
2.487 8.022
2.616 7.795
2.773 6.344
2.915 7.050
3.074 6.283
3.208 7.495
3.395 5.344
3.535 7.111
3.682 6.839
3.830 6.730
4.023 5.185
This is an example from a table. What I want to do is to create a formulate that will pull the Max Frequency when Time is greater that 1 and less than 3. I know this can be done by manually selecting the range, but I have many different ranges that I want to find the max freq for would like to be able to just input the column.
You can reference upper and lower bounds for the time variable like this:
+---+----+----+-------+
| | D | E | F |
+---+----+----+-------+
| 1 | LB | UB |MaxFreq|
| 2 | 1 | 3 | 9.675 |
| 3 | 0 | 1 | 6.108 |
| 4 | 1 | 2 | 8.17 |
| 5 | 2 | 3 | 9.675 |
+---+----+----+-------+
F2: =MAX(IF(($A$1:$A$26>$D2)*($A$1:$A$26<$E2),$B$1:$B$26))
F2 is an array formula--confirm the entry with the combination Ctrl+Shift+Enter (not just Enter). It can be copied down as far as needed.