Skip to content

Instantly share code, notes, and snippets.

@RecalcOrDie
Created May 5, 2022 01:15
Show Gist options
  • Save RecalcOrDie/a0e2402cc94ac2aad28c945a3079ad6e to your computer and use it in GitHub Desktop.
Save RecalcOrDie/a0e2402cc94ac2aad28c945a3079ad6e to your computer and use it in GitHub Desktop.
LAMBDA used to find the median for the cells specified by a given condition or criteria
/*
Name: MEDIANIF
Description: LAMBDA used to find the median for the cells specified by a given condition or criteria
Author: Mike Girvin from ExcelisFun
Category: Dynamic Arrays
*/
MEDIANIF = LAMBDA(
CriteriaRange,
CriteriaValue,
ValuesRange,
BYROW( CriteriaValue,
LAMBDA( CriteriaValue,
MEDIAN(
FILTER( ValuesRange,
CriteriaRange = CriteriaValue )
)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment