+ Reply to Thread
Results 1 to 18 of 18

Row data to column, with two columns of data to repeat

  1. #1
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Row data to column, with two columns of data to repeat

    I have a survey for teams registering for a competition. Teams are min of 3 members, max of 10.

    The Team Members tab in the attached file shows the data export from the survey.

    The Members Data tab shows what I need to extract from the Team Members tab data.

    The Team Data tab is another data source I have, in case it helps to extract the Members Data

    And the blank fields aren't blank when exported. They have non-printing characters.

    Appreciate any help! Thanks!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Row data to column, with two columns of data to repeat

    Hello TanyaMc,

    Welcome to the forum

    Can I ask you to clarify a few details? What is the maximum number members a team can have? And do you prefer an approach with just formulas, or are you also fine with VBA?
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  3. #3
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    Max is 10, including the leaders

    Formulas only please.

    Many thanks for the welcome!

  4. #4
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Row data to column, with two columns of data to repeat

    In that case, do you want like, giant formulas, or you are fine with helper columns? In case you are, how many would you tolerate?

    Also will the data gets huge, like thousands of lines?

  5. #5
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    There are over 70 teams already registered. I expect to double that before it's over. So 140 x10 max = 1400 members

    I intend to export the file from the survey, do what I need to for the final three column result, and then paste those three columns as data into another super file that is doing mega calcs that was set up previously.

    Had I known, I would have set up the registration form differently Too late now.

  6. #6
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Row data to column, with two columns of data to repeat

    Please give this sample file a try.

    Simply drag the rows with formula on the helper list down until you see a load of blank values, and #N/A value on the Member Data sheet.

    To be honest, this is a pain to use if you only want formulas, do you want to try a VBA approach?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    I know nothing about VBA, and I think it is disabled on my work computer. But am open to trying it. Thanks

  8. #8
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Row data to column, with two columns of data to repeat

    In that case, give this sample file a try.

    Simply click the "Generate Members' Data" button in the first worksheet, and it will run in less than a blink of an eye.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    Awesome! Many thanks!

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

    Re: Row data to column, with two columns of data to repeat

    Another way ... formula wise.

    Excel normally "thinks" left to right. Due to number of team members driving the rest of the row outputs this is a little "back-wards". I put header helpers in Members Data sheet that more

    closely match those in Team members.


    And the blank fields aren't blank when exported. They have non-printing characters.
    The first formula takes care of that. It is array-entered in B3 and filled down until you get blanks.


    =IFERROR(INDEX('Team Members'!$A$2:$M$150,SMALL(IF(TRIM(CLEAN(SUBSTITUTE('Team Members'!$B$2:$K$150,CHAR(160),"")))<>"",ROW('Team Members'!$B$2:$K$150)-MIN(ROW('Team Members'!$B$2:$K$150))+1),ROWS($3:3)),MATCH('Members Data'!B$1&"*",'Team Members'!$A$1:$M$1,0)),"")

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

    These next two are entered regularly.

    In C3

    =IFERROR(INDEX('Team Members'!$A$2:$M$150,MATCH(B3,'Team Members'!$A$2:$A$150,0),MATCH('Members Data'!C$1,'Team Members'!$A$1:$M$1,0)),"")

    in A3

    =IFERROR(INDEX('Team Members'!$B$2:$K$150,MATCH(B3,'Team Members'!$A$2:$A$150,0),MOD(COUNTIF($B$3:B3,B3)-1,COUNTIF($B:$B,B3))+1),"")
    Last edited by FlameRetired; 05-21-2016 at 01:53 AM. Reason: Correction to a range reference
    Dave

  11. #11
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    Great! Thank you!!

    I was working with transposing and someone suggested lookup tables but I couldn't work it out. I thought there should be a way to use the team table to assign the state/team name based on leader but couldn't seem to work that out either!

    The surveys always put questions in columns and responses in rows. The master calculation file someone else made is using lookup tables to manipulate the response data.
    Last edited by TanyaMc; 05-21-2016 at 11:15 AM.

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

    Re: Row data to column, with two columns of data to repeat

    TanyaMc,

    With as many rows as you anticipate for output you may want to consider changing that first formula I posted from

    =IFERROR(INDEX('Team Members'!$A$2:$M$150,SMALL(IF(TRIM(CLEAN(SUBSTITUTE('Team Members'!$B$2:$K$150,CHAR(160),"")))<>"",ROW('Team Members'!$B$2:$K$150)-MIN(ROW('Team Members'!$B$2:$K$150))+1),ROWS($3:3)),MATCH('Members Data'!B$1&"*",'Team Members'!$A$1:$M$1,0)),"")

    to:

    =IFERROR(INDEX('Team Members'!$A$2:$M$150,SMALL(IF(TRIM(CLEAN(SUBSTITUTE('Team Members'!$B$2:$K$150,CHAR(160),"")))<>"",ROW('Team Members'!$B$2:$K$150)-MIN(ROW('Team Members'!$B$2:$K$150))+1),ROW()-ROW($3:$3)+1),MATCH('Members Data'!B$1&"*",'Team Members'!$A$1:$M$1,0)),"")


    I have been experimenting lately with that construction in the K value of SMALL. It consistently outperforms the former noticeably. May not be noticeable now, but as rows of output increase you will likely note a significant performance drag with the original formula.

  13. #13
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    Will do. Thanks!

  14. #14
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    I had to add another column that should follow the member from the team page to the member list. I have no idea how to edit your file to do that. I would appreciate your help again. thanks

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

    Re: Row data to column, with two columns of data to repeat

    I'm not clear on what you mean. Are you adding more team members to some teams? Can you upload another workbook showing what you propose?

  16. #16
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    I added an eligibility column to the team registration file (attached)

    And so the extract needs to provide these columns
    Member Name Team Name Affiliation Eligibility

    The one that Lemice made for me needs to have the Eligibility column added.

    Does that help? Thanks!
    Attached Files Attached Files

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

    Re: Row data to column, with two columns of data to repeat

    It just needs some ranges extended.

    In B3 of 'Members Data' array enter this formula and fill down. (Same as before ... commit from edit mode with Ctrl + Shift + Enter)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in A3 and filled down this regular formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in C3 this regular formula filled down and across column D.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The modified headers are the same as my previous with the addition of the Eligibility column.

  18. #18
    Registered User
    Join Date
    05-20-2016
    Location
    SD, USA
    MS-Off Ver
    O365
    Posts
    15

    Re: Row data to column, with two columns of data to repeat

    Many thanks!

+ 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. Repeat formula in column H until the last row with data in column G
    By matteobsuetti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-23-2015, 08:36 AM
  2. Copy column 1-18 then if further data to the right repeat and paste under first data
    By zx142985 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-14-2015, 04:43 AM
  3. Replies: 3
    Last Post: 07-21-2014, 01:34 PM
  4. [SOLVED] Repeat Column of Data Down a Row Using a Formula
    By pookyman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-10-2014, 11:56 AM
  5. Merge data from cells on 2nd columns in which the cells of 1st column repeat
    By jagke in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-14-2013, 01:06 PM
  6. [SOLVED] Repeat the missing column data!!
    By johnbest in forum Excel General
    Replies: 5
    Last Post: 10-19-2012, 12:45 AM
  7. [SOLVED] Macro to convert 4 columns of data into rows, then repeat
    By liastar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-22-2012, 03:52 AM

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