Assuming your categories are in cells A1:A6 and the corresponding values are in B1:B6, you might try typing the formula =MEDIAN(IF($A$1:$A$6="Airline",$B$1:$B$6,""))
in another cell and then pressing CTRL+SHIFT+ENTER
.
Using CTRL+SHIFT+ENTER
tells Excel to treat the formula as an “array formula”. In this example, that means that the IF
statement returns an array of 6 values (one of each of the cells in the range $A$1:$A$6
) instead of a single value. The MEDIAN
function then returns the median of these values. See http://www.cpearson.com/excel/arrayformulas.aspx for a similar example using AVERAGE
instead of MEDIAN
.
Related Posts:
- strdup() – what does it do in C?
- strdup() – what does it do in C?
- “Parameter” vs “Argument”
- What is the proper declaration of main in C++?
- ‘foo’ was not declared in this scope c++
- PHP Fatal error: Using $this when not in object context
- excel IF formula Error, “You’ve entered too many arguments”
- How do you pass a function as a parameter in C?
- How do you pass a function as a parameter in C?
- How to return a result from a VBA function
- Using multiple .cpp files in c++ program?
- Optional arguments in C function
- How do I use the filter function in Haskell?
- the functions (procedures) in MIPS
- C: How do I make a number always round up
- && (AND) and || (OR) in IF statements
- IndexError: too many indices for array
- C++ — expected primary-expression before ‘ ‘
- Putting a simple if-then-else statement on one line [duplicate]
- ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine
- How to use *ngIf else?
- Basic explanation of python functions
- Swap x and y axis without manually swapping values
- Excel: Calculate the frequency of a particular month in a column of date cells
- Finding median of list in Python
- Looking for a clear description of Excel’s .xlsx XML format
- An “and” operator for an “if” statement in Bash
- Deprecated: mysql_connect()
- C error: undefined reference to function, but it IS defined
- Object Required Error in excel VBA
- “[ ]” vs. “[[ ]]” in Bash shell
- Else without if
- If vs. else if vs. else statements?
- Return value in a Bash function
- break out of if and foreach
- Required: Variable Found: Value
- Simple way to calculate median with MySQL
- How can I import an Excel file into SQL Server?
- What is correct content-type for excel files?
- How do I get countifs to select all non-blank cells in Excel?
- error: “initializer expression list treated as compound expression”
- VBA Runtime Error 1004 “Application-defined or Object-defined error” when Selecting Range
- Workaround for “Formula omits adjacent cells”
- Bash if statement with multiple conditions throws an error
- Getting error: ISO C++ forbids declaration of with no type
- How to stop a function
- Why does “Paste Method of Worksheet class failed” occasionally occur?
- PHP if not statements
- includes() not working in all browsers
- Lua – if statement with two conditions on the same variable?
- if else construction
- check if a file is open in Python
- Anagrams finder in javascript
- Python: Can a function return an array and a variable?
- Exception from HRESULT: 0x800A03EC Error
- Using if-else in JSP
- Use VBA to Clear Immediate Window?
- Syntax error on token(s), misplaced construct(s)
- Php include not working? function not being included
- JAVA Variable declaration not allowed here
- jquery – is not a function error
- ternary operator in matlab
- What does it mean that “a declaration shadows a parameter”?
- How to add an object to an array
- How to return a boolean method in java?
- Excel VBA: Can’t get a match, error “Unable to get the Match property of the WorksheetFunction class”
- What is define([ , function ]) in JavaScript?
- Why can’t we pass arrays to function by value?
- break statement in “if else” – java
- Stopping a JavaScript function when a certain condition is met
- VBA: Convert Text to Number
- VBA Error: “Compile error: Expected End Sub”
- Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support
- Simplest/cleanest way to implement a singleton in JavaScript
- How to open an Excel file in C#?
- Create a function with optional call variables
- Return array from function
- Adding a newline character within a cell (CSV)
- Passing string to a function in C – with or without pointers?
- Javascript call() & apply() vs bind()?
- Loop without Do error
- function does not take 1 arguments c++
- JavaScript button onclick not working
- How to install Date Picker form control in Excel 2016
- warning: return makes pointer from integer without a cast but returns integer as desired
- Is there a math nCr function in python? [duplicate]
- Finding the median of an unsorted array
- Difference between function arguments declared with & and * in C++
- What is the meaning of the dollar sign “$” in R function()?
- How to label scatterplot points by name?
- “cannot be used as a function error”
- JavaScript single line ‘if’ statement – best syntax, this alternative?
- Using OR operator in a jQuery if statement
- Why does my VBA code throw an “Invalid outside procedure” error?
- Average in VBA in Excel
- PHP Like thing similar to MySQL Like, for if statement?
- Paste Special error 1004 PasteSpecial method of Range class failed
- $http.get(…).success is not a function
- Is there a way to crack the password on an Excel VBA Project?
- change homepage for logged-in users in wordpress