+ Reply to Thread
Results 1 to 11 of 11

Attempting to flatten multiple temporal data points for single identifier

Hybrid View

  1. #1
    Registered User
    Join Date
    10-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    6

    Attempting to flatten multiple temporal data points for single identifier

    Hello, and thanks for anyone taking a look at this. I'm not particularly good with excel, but have some limited knowledge. I am working on a medical research project involving taking information from patients for multiple days. On the first day they come in, the software that I use for data collection will attach all non-temporal characteristics of the patient in numerical form on that same row. Then each additional day the patient is recorded, it only records one number to indicate a single variable (marked level) on the sample attached. What I need to accomplish is to make it so that I can somehow flatten the entry to show only the maximum value for all recorded days in one line so that each patient has only one row. I have attached an excel with what it would look like before and after ideally. Really appreciate if anyone can help me with this!
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Attempting to flatten multiple temporal data points for single identifier

    All the formulas stated below are Array Formulas.

    Array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.

    In A20 Cell - Array Formula - Requires CTRL+SHIFT+ENTER

    =IFERROR(INDEX($A$2:$A$14,MATCH(0,COUNTIF($A$19:$A19,$A$2:$A$14),0)),"")

    Drag it down…

    In B20 Cell - Array Formula - Requires CTRL+SHIFT+ENTER

    =IFERROR(INDEX($B$2:$B$14,LARGE(IF(($A$2:$A$14=$A20),ROW($A$2:$A$14)-MIN(ROW($A$2:$A$14))+1),1)),"")

    Drag it down…

    In C20 Cell - Array Formula - Requires CTRL+SHIFT+ENTER

    =IFERROR(INDEX(D$2:D$14,LARGE(IF(($A$2:$A$14=$A20)*(D$2:D$14<>""),ROW($A$2:$A$14)-MIN(ROW($A$2:$A$14))+1),1)),"")

    Drag it right and down…


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    10-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Attempting to flatten multiple temporal data points for single identifier

    thanks for your help! I am wondering, however, will this equation work for a data set involving 500+ patients? Like an apply automatically to entire sheet method?

  4. #4
    Registered User
    Join Date
    10-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Attempting to flatten multiple temporal data points for single identifier

    Quote Originally Posted by cranialnerve View Post
    thanks for your help! I am wondering, however, will this equation work for a data set involving 500+ patients? Like an apply automatically to entire sheet method?
    Nevermind, I gave this a try and it works great. Thanks!

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Attempting to flatten multiple temporal data points for single identifier

    Glad it helps you and thanks for the feedback and rep

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  6. #6
    Registered User
    Join Date
    10-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Attempting to flatten multiple temporal data points for single identifier

    I'm actually having a bit of trouble now. I am getting an incorrect return for my column C level. For example, see below for before/af:

    3 admit_arm_1 5
    3 day_1_arm_1 5
    7 admit_arm_1 5
    7 day_1_arm_1 6
    7 day_2_arm_1 5
    7 day_3_arm_1 5
    7 day_4_arm_1 5
    7 day_5_arm_1 6
    7 day_6_arm_1 5
    7 day_7_arm_1 5
    7 day_8_arm_1 5
    7 day_9_arm_1 5
    8 admit_arm_1 5
    8 day_1_arm_1 5
    8 day_2_arm_1 5
    8 day_3_arm_1 5


    Summarized as:
    3 5
    7 5
    8 5



    As you can see, it is showing 5 for all of them when it really is: 5, 6, 5

+ 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. Multiple Data Points for a Single Day
    By SheilaV in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 08-20-2019, 02:51 AM
  2. Need macro to search multiple data points from multiple entries and return single value
    By Redbullmoo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-11-2013, 02:16 AM
  3. Lookup multiple data points to find info in a single cell
    By cradams72 in forum Excel General
    Replies: 1
    Last Post: 08-17-2011, 10:51 AM
  4. Evaluate Multiple Data Points Against Single Criteria
    By fmulvaney in forum Excel General
    Replies: 3
    Last Post: 08-31-2010, 03:26 PM
  5. Pie Chart plotting 1 single color for multiple data points
    By moonseed in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-12-2008, 03:41 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