About MrExcel
Consulting Services
Learn Excel Resources
Challenge of the Month
MrExcel Seminars

Message Board

MrExcel Store


Extracted from Message Board

John Munoz asked "I'm trying to calculate the median of salaries with a particular job code within a large set of data...something like a Sumif function but to calculate the median. Is there a way to do this?"

This is an issue that calls one of the great things in Excel: Array formulas (Or CSE Formulae, as refered here at, check this tip for hints on CSE Formulae). Let's assume that the Job codes are in A2:A100 and Salaries are in B2:B100. This pretty straightforward formula would give the expected results:


Remember, this is a CSE Formula, to enter it you must press at the same time Control Shift Enter, instead of just Enter as regular formulas.

By Juan Pablo Gonzalez on 19-Jan-2002 Consulting can be hired to implement this concept, or many other cool applications, with your data. provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures on this web site are provided "as is" and we do not guarantee that they can be used in all situations.


Excel is a registered trademark of the Microsoft® Corporation.

All contents Copyright 1998-2008 by MrExcel Consulting.