+ Reply to Thread
Results 1 to 2 of 2

Multiple if statements within median forumla

  1. #1
    Registered User
    Join Date
    11-19-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    1

    Multiple if statements within median forumla

    Hi there,

    I'm putting together a template of formulas to break down a pile of research data on salary and employment conditions globally.

    I've managed to figure out a large chunk of it however I've been stonewalled.

    The formula I used for breaking down median salaries is: =MEDIAN(IF(F2:F818=A823,IF(Q2:Q818=B824,IF(O2:O818=D822,H2:H818))))
    This gives median salary and breaks down by country, size of the company, and male or female.

    I'm trying to start a new section using the same formula but adding an additional IF statement - this is to further break down the research by years of experience (all other conditions remain)

    I'm using =MEDIAN(IF(F2:F818=A852,IF(Q2:Q818=B853,IF(O2:O818=C854,IF(L2:L818=D851,H2:H818)))))

    For the life of me I can't see what I am doing wrong but it is only coming up with #NUM!

    I wondered if there is a limit on the number of IF statements?

    Another thought is perhaps it just could not handle different words? This would explain why I can't use the same formula to pull out New Zealand data... although Hong Kong worked fine so I'm lost.

    Sorry - I'm completely new at this.

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Multiple if statements within median forumla

    Excel does have a limit on the number of IFs you can next: that number is 7, so you're fine there.

    Looking at that I'd prefer to use an AND, but it is an array formula, which don't like AND / OR, so you're stuck there, I guess.

    Well, it could be that there's simply nothing in the range that matches all four criteria; MEDIAN delivers a #NUM! error when array has zero elements.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Median with two If statements in an array formula
    By Debbie Thomson in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-27-2013, 09:39 PM
  2. [SOLVED] Median Ifs, need to find median $ amount per deal for each year
    By xenomorph8472 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2012, 02:01 PM
  3. Median Array with 3 if statements
    By dstogner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 10:14 PM
  4. median if with multiple criteria
    By coffee_man in forum Excel General
    Replies: 2
    Last Post: 10-20-2011, 06:36 AM
  5. Replies: 12
    Last Post: 05-15-2009, 08:38 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1