+ Reply to Thread
Results 1 to 6 of 6

formula for calculating quintiles if there is a value in adjecent cell

  1. #1
    Registered User
    Join Date
    07-21-2012
    Location
    Prague, Czech
    MS-Off Ver
    Excel 2010
    Posts
    9

    formula for calculating quintiles if there is a value in adjecent cell

    Hi.
    I have a set of data in a table: names in column A (all cells are filled), and respective datapoints in two columns B and C.
    Some detapoints in B and in C are missing (cells are empty but with linking formula that returns blank cells). Important - empty cells in B and C are in different rows.
    I need to calculate average by quintiles (and by quartiles and terciles) of values in column B, but only for those datapoints, that do have data in both B and C column. So to (a) disregard the data in B cell, if C cell in the same row is empty and also (b) to disregard the empty cells in B.
    Doable? Please help!
    Daniello1
    Last edited by zbor; 08-31-2012 at 04:56 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,605

    Re: formula for calculating quintiles from complicated dataset ?

    Can you upload example workbook with your inputs and desired output?

  3. #3
    Registered User
    Join Date
    07-21-2012
    Location
    Prague, Czech
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: formula for calculating quintiles from complicated dataset ?

    Hi zbor

    Here it is - I converted links to data (as file was very heavy), so in original file you would have links to cells in another spreadsheet (so all blank cells would have formulas in it).
    In original file there is >1000 rows and I have ca 120 identical files to run this, so need automatization.

    What I need to do is to put companies (ISIN) into 3, 4 or 5 same-sized subgroups (terciles, quartiles and quintiles), ranked from highest to lowest % sales change yoy (column C) and than to calculate average return per each subgroup (column D) and also average sales change yoy in each subgroup.
    But I need to disregard all rows, where one of data (C or D) is missing. Afterwards, I would like to do the same but within each sector separatelly.
    Thanks for any help !
    Attached Files Attached Files

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,605

    Re: formula for calculating quintiles if there is a value in adjecent cell

    You didn't put your expected result so do you mean like this:

    =IF(COUNT(C6:D6)=2, C6*D6/5, "")
    Last edited by zbor; 08-31-2012 at 09:52 AM.

  5. #5
    Registered User
    Join Date
    07-21-2012
    Location
    Prague, Czech
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: formula for calculating quintiles if there is a value in adjecent cell

    sorry, youre right.
    Its not exactly what I needs - please see revised file attached, with the desired result.
    Only rows with data in both C and D are taken into calculations.
    Thanks !
    Attached Files Attached Files

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,605

    Re: formula for calculating quintiles if there is a value in adjecent cell

    See here does this UDF helps you:

    Edit: With a spetial thanks to Andrew-R..
    Attached Files Attached Files
    Last edited by zbor; 08-31-2012 at 11:15 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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