Comments on: In Excel, getting the MEDIAN of a set based on a text pattern match
http://ask.metafilter.com/227554/In-Excel-getting-the-MEDIAN-of-a-set-based-on-a-text-pattern-match/
Comments on Ask MetaFilter post In Excel, getting the MEDIAN of a set based on a text pattern matchFri, 26 Oct 2012 22:19:38 -0800Fri, 26 Oct 2012 22:33:32 -0800en-ushttp://blogs.law.harvard.edu/tech/rss60Question: In Excel, getting the MEDIAN of a set based on a text pattern match
http://ask.metafilter.com/227554/In-Excel-getting-the-MEDIAN-of-a-set-based-on-a-text-pattern-match
In Excel, I have two columns. Column A has many rows of names (e.g., Mary, Maryjane, Maryanne, Anne, Jane) and in Column B I have their ages (e.g., 4, 20, 40, 10). I would like to find the MEDIAN age of all the "mary's"; i.e., both "mary" and "maryanne", etc.
Is this possible? I have been getting errors on variations of {=MEDIAN(IF(A1:A4="*mary*",B1:B4))} constructions...
I do not want to use VBA.
thank you!post:ask.metafilter.com,2012:site.227554Fri, 26 Oct 2012 22:19:38 -0800nowayexcelmedianconditionalpatternresolvedBy: calgirl
http://ask.metafilter.com/227554/In-Excel-getting-the-MEDIAN-of-a-set-based-on-a-text-pattern-match#3293210
here's a sample that I found online at stackoverflow.com<br>
<br>
=MEDIAN(IF(A:A = "x",IF(B:B<>"",B:B, ""),"")<br>
<br>
I'm not sure I understand the details...can you make use of this?</>comment:ask.metafilter.com,2012:site.227554-3293210Fri, 26 Oct 2012 22:33:32 -0800calgirlBy: Alice Russel-Wallace
http://ask.metafilter.com/227554/In-Excel-getting-the-MEDIAN-of-a-set-based-on-a-text-pattern-match#3293219
Just use a filter for any cell that contains the word Mary, and then do the calculations on that subset.comment:ask.metafilter.com,2012:site.227554-3293219Fri, 26 Oct 2012 23:01:59 -0800Alice Russel-WallaceBy: hot soup
http://ask.metafilter.com/227554/In-Excel-getting-the-MEDIAN-of-a-set-based-on-a-text-pattern-match#3293225
I apologize in advance - i'm on my phone and this may not work. You should be able to do this with an array formula (Ctrl Shift Enter) <br>
assuming you're using columns A and B and have 5 values, try this but press Ctrl Shift Enter when entering in the formula (brackets should appear around the formula) <br>
<br>
= MEDIAN(IF(ISNUMBER(SEARCH("mary",A1:A5)),B1:B5))comment:ask.metafilter.com,2012:site.227554-3293225Fri, 26 Oct 2012 23:22:06 -0800hot soupBy: noway
http://ask.metafilter.com/227554/In-Excel-getting-the-MEDIAN-of-a-set-based-on-a-text-pattern-match#3293227
hi calgirl, i think i've seen that page as well. google searches for these and related terms are pretty slim. alice, that's definitely what i want to do but i'm not sure how i would do that filter – am not an Excel user – and things like FIND, MATCH, ISERROR, etc. don't seem to be right. thanks!comment:ask.metafilter.com,2012:site.227554-3293227Fri, 26 Oct 2012 23:24:28 -0800nowayBy: noway
http://ask.metafilter.com/227554/In-Excel-getting-the-MEDIAN-of-a-set-based-on-a-text-pattern-match#3293229
hot soup! you have taught me a new way to fish. thank you!comment:ask.metafilter.com,2012:site.227554-3293229Fri, 26 Oct 2012 23:27:57 -0800noway