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
- Pig Latin Translator
- MS Excel Scatterplot converts Months to Numbers
- && (AND) and || (OR) in IF statements
- Substring in excel
- IndexError: too many indices for array
- IndexError: too many indices for array
- What does <> mean?
- Python’s equivalent of && (logical-and) in an if-statement
- Define a global variable in a JavaScript function
- Interpreting “condition has length > 1” warning from `if` function
- How to send an email with Python?
- C++ — expected primary-expression before ‘ ‘
- Excel to Google Sheets – Error: Formula parse error
- Define a global variable in a JavaScript function
- Is double square brackets [[ ]] preferable over single square brackets [ ] in Bash?
- Cannot read property ‘addEventListener’ of null
- Return array in a function
- Meaning of = delete after function declaration
- Putting a simple if-then-else statement on one line [duplicate]
- How to write inline if statement for print?
- How do I define a function with optional arguments?
- ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine
- “If not” condition statement in python
- Expression must be a modifiable lvalue
- How to use *ngIf else?
- Basic explanation of python functions
- IndexError: too many indices for array
- Swap x and y axis without manually swapping values
- Excel: Calculate the frequency of a particular month in a column of date cells
- What’s the difference between a method and a function?
- Python inline if statement
- What is the naming convention in Python for variable and function names?
- How to create a jQuery function (a new jQuery method or plugin)?
- if else in a list comprehension
- Function to Calculate Median in SQL Server
- How to make “if not true condition”?
- if else in a list comprehension
- Finding median of list in Python
- Function to Calculate Median in SQL Server
- An “and” operator for an “if” statement in Bash
- SQL Server IF EXISTS THEN 1 ELSE 2
- Why does python use ‘else’ after for and while loops?
- Passing parameters to a Bash function
- Looking for a clear description of Excel’s .xlsx XML format
- How do I perform an IF…THEN in an SQL SELECT?
- An “and” operator for an “if” statement in Bash
- Python’s equivalent of && (logical-and) in an if-statement
- Deprecated: mysql_connect()
- C error: undefined reference to function, but it IS defined
- Invalid column count in CSV input on line 1 Error
- Call a function from another file?
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- Invalid column count in CSV input on line 1 Error
- Haskell pattern matching – what is it?
- How to find a value in an excel column by vba code Cells.Find
- Python Calling Function from Another File
- How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops
- Pythonic way to combine FOR loop and IF statement
- Python Invalid syntax in elif
- invalid use of non-static member function
- Object Required Error in excel VBA
- PLS-00201 – identifier must be declared
- Reverse Contents in Array
- What is the best way to exit a function (which has no return value) in python before the function ends (e.g. a check fails)?
- IndexError: index 1 is out of bounds for axis 0 with size 1/ForwardEuler
- “[ ]” vs. “[[ ]]” in Bash shell
- How do I compare two string variables in an ‘if’ statement in Bash?
- c++: No instance of overloaded function
- Else without if
- If vs. else if vs. else statements?
- Apply function to each element of a list
- error: expected primary-expression before ‘)’ token (C)
- Insert picture into Excel cell
- Export html table data to Excel using JavaScript / JQuery is not working properly in chrome browser
- Return value in a Bash function
- What is a correct MIME type for .docx, .pptx, etc.?
- Is there Infinity in Spreadsheets?
- How do you pass a function as a parameter in C?
- How to fix file format and extension don’t match?
- Python return list from function
- Declaring variables in Excel Cells
- What is the difference between call and apply?
- Python 3: UnboundLocalError: local variable referenced before assignment
- What are .NumberFormat Options In Excel VBA?
- Don’t understand this SyntaxError: illegal target for annotation