+ Reply to Thread
Results 1 to 8 of 8

Array to Display Row of Data

  1. #1
    Registered User
    Join Date
    05-17-2019
    Location
    California
    MS-Off Ver
    2016
    Posts
    19

    Array to Display Row of Data

    I have a data set where a participant entered their then and then the members of their group. I have an IF Array statement to pull the names of participants based on who said a certain name as their group member.

    NOW, I need an array to display the entire row of data associated with these names. The problem I am having is this array is dependent on the original IF Array statement.

    Is there a way to nest arrays or another way to display an entire row of data?

    My IF Array: {=IF(C3=D3:I26,C3:C26,FALSE)}

    My INDEX Array attempt: {=INDEX(K3:AH26,IF(C3=D3:I26,C3:C26,0),0)}

  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 2403
    Posts
    44,036

    Re: Array to Display Row of Data

    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    05-17-2019
    Location
    California
    MS-Off Ver
    2016
    Posts
    19

    Re: Array to Display Row of Data

    Thank you for replying. I have attached a mock up to make things more clear. I hope this helps. Thank you for your help!
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Array to Display Row of Data

    Hello profess. Welcome to the forum.

    This works if each group always contains 3 records. If else please let us know.

    In the attached find in the shaded copy of 'Output' this formula in F2 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in A2 filled down and across this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Dave

  5. #5
    Registered User
    Join Date
    05-17-2019
    Location
    California
    MS-Off Ver
    2016
    Posts
    19

    Re: Array to Display Row of Data

    Thank you for helping me with this!

    I will be working with varying size of groups in different data sets so the groups will vary from 2 to 6. Can you tell me how to adjust the code so that I can cover all the group columns? Thank you!

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Array to Display Row of Data

    Please post another example more representative of what you will be working with. It saves typing and inventing data/layout at this end and may reveal other details not mentioned so far. Please also include expected results as you did in the first upload. All these things can affect solution.

  7. #7
    Registered User
    Join Date
    05-17-2019
    Location
    California
    MS-Off Ver
    2016
    Posts
    19

    Re: Array to Display Row of Data

    Thank you for helping me. Here is another sample which is a bit more complicated since the groups vary in size based on who they said their group members were.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Array to Display Row of Data

    This proposal employs three helper columns, which may be moved and/or hidden for aesthetic purposes.
    On the Data Set sheet column H, Group members, is populated using: =B2&C2&D2&E2&F2&G2
    Column I, Group #, is populated using: =MATCH(H2,H$2:H2,0)
    On the Output sheet column A is populated using: =IFERROR(AGGREGATE(15,6,'Data Set'!I$2:I$25,ROWS(A$1:A1)),"")
    Column B is populated using: =IF(A5="","",INDEX('Data Set'!A$2:A$25,AGGREGATE(15,6,(ROW(A$2:A$25)-ROW(A$1))/('Data Set'!I$2:I$25=A5),COUNTIFS(A$5:A5,A5))))
    Columns C:AB are populated using: =IF(A5="","",INDEX('Data Set'!J$2:J$25,MATCH($B5,'Data Set'!$A$2:$A$25,0)))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Find text in array and display related data
    By KimMorgan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-17-2016, 04:53 PM
  2. [SOLVED] Display pivot Table in an Listbox from Array data
    By evertjvr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2015, 03:01 AM
  3. display collected array data in a MsgBox
    By UMBiii in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-21-2014, 01:24 PM
  4. Array formula to automate display of Fleet List data from a Table
    By azatherazza in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-20-2014, 04:06 AM
  5. Array search - display project data and column number for further indexing
    By zenqueth in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-26-2012, 07:26 AM
  6. Help with formula to display an array of data
    By MISC_IT in forum Excel General
    Replies: 3
    Last Post: 05-30-2012, 03:20 PM
  7. Display an Array of Data Based on Other Data
    By nycstinger in forum Excel General
    Replies: 8
    Last Post: 09-18-2009, 06:55 AM

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