+ Reply to Thread
Results 1 to 5 of 5

How can i use a Median+If formula with multiple 'if' criteria

  1. #1
    Registered User
    Join Date
    09-07-2014
    Location
    San Marcos, California
    MS-Off Ver
    Excel 2010
    Posts
    3

    How can i use a Median+If formula with multiple 'if' criteria

    Hello,

    I need to analyze data for pay per click campaigns to sell musical (theatre) play tickets. We want to find the campaign that has the best ROI by month by play for the lead time between date of sale and date of the 'event'. I have a block of data that is essentially as follows:

    Play name,
    Campaign source,
    Date Sold,
    Date of event,
    Lead time of sale (this is a calculation of the # of days between when a sale is made and the event actually occurs).
    $ Amount of ticket

    I am wanting to have a summary that has the list of events vertically, with the months of the year horizontally and want to read the data and for each month/event combination pull the median of all the source date for event by month.

    I can do this if i create formula keys on my data set that has a separate column for each event+leadtime+month of sale but that is an enormous amount of formulas for something i think i should be able to do via an array/Median If.

    Anyone run into this before?

    I sure appreciate the help.

    Thanks!

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How can i use a Median+If formula with multiple 'if' criteria

    Nope. I can't visualise that. ROI = Republic of Ireland???

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    09-07-2014
    Location
    San Marcos, California
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: How can i use a Median+If formula with multiple 'if' criteria

    Thanks for the fast response Glen!

    I have attached the sample workbook with a 'Summary' tab, a 'Data' tab and a lookups tab i used to dummy up the data.

    On the summary tab, i am showing my 'end goal' which is to show the lead time for ticket purchases in a number of ways. I can get the figures to work for the 'overall' lead time for one of the data sets, the example shows it with 'Lead Time by Event' and the 'Overall' is complete.

    What i cannot seem to get a clean process for is to also show it by month from the same data set and that is what i'm hoping for.

    I look forward to hearing back from you!

    Loren

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: How can i use a Median+If formula with multiple 'if' criteria

    Please try at

    B8 Press Ctrl+Shift+Enter
    =IFERROR(MEDIAN(IF(Data!$A$2:$A$22=$A8,Data!$E$2:$E$22)),"N/A")

    C8 Press Ctrl+Shift+Enter and drag to N8
    =IFERROR(MEDIAN(IF((Data!$A$2:$A$22=$A8)*(TEXT(Data!$D$2:$D$22,"mmmm")=C$6),Data!$E$2:$E$22)),"-")


    Copy B8:N8 down.

  5. #5
    Registered User
    Join Date
    09-07-2014
    Location
    San Marcos, California
    MS-Off Ver
    Excel 2010
    Posts
    3

    Thumbs up Re: How can i use a Median+If formula with multiple 'if' criteria

    That is excellent Bo, thanks!

    I did make one slight change so that the dates being looked at are the purchase dates and not the event dates but otherwise works perfectly!

    Thank you!

    Loren

+ 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 formula with multiple criteria (or not and) and partial text in a cell
    By SouthFlorida in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 11-18-2019, 02:29 PM
  2. Median multiple criteria vba
    By serir2 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2016, 07:55 AM
  3. Replies: 1
    Last Post: 02-15-2016, 04:35 PM
  4. Trying to find median & average for multiple columns with multiple criteria
    By help-meplease in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2016, 06:59 PM
  5. YTD Median using Multiple Criteria
    By Decatur83 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2013, 09:00 AM
  6. median if with multiple criteria
    By coffee_man in forum Excel General
    Replies: 2
    Last Post: 10-20-2011, 06:36 AM
  7. [SOLVED] calculate a MEDIAN using multiple criteria?
    By MetricsShiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM

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