+ Reply to Thread
Results 1 to 7 of 7

Combining a variety of data from different columns

  1. #1
    Registered User
    Join Date
    01-19-2024
    Location
    glasgow
    MS-Off Ver
    365
    Posts
    12

    Combining a variety of data from different columns

    Hi all,
    I work in a school and we have approx 200 pupils who have selected 7 subjects each.
    I have a spreadsheet with pupils names and the subjects they've picked.
    Some pupils will have picked Maths in column A and English in column B. For others, they might have done the opposite.
    I'd like....
    1) To pull all the maths pupils together into individual subject sheets(from column A, B, C etc.)
    and if possible
    2) Given that there are 30 different subject choices, is there a way to automatically create sheets if I have a list of the individual subjects?

    The sheet currently looks like:

    John Adams English Maths French Music PE Chemistry History
    Claire Smith Maths Biology English Computing Physics Music
    Mike Long Woodwork English Maths Art Biology PE RE

    Thank you!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,288

    Re: Combining a variety of data from different columns

    Welcome to the forum.

    Assuming that your 'online' Excel is 365 (please update your forum profile accordingly), try this to generate lists:

    =LET(u,TRANSPOSE(UNIQUE(SORT(TOCOL(B2:H4,1)))),n,IFERROR(DROP(REDUCE("",u,LAMBDA(z,y,HSTACK(z,FILTER(A2:A4,BYROW(B2:H4,LAMBDA(r,COUNTIF(r,y)))=1)))),,1),""),VSTACK(u,n))

    Pulling these apart into different sheets automatically would require VBA, which is NOT supported in the online version. It can be done if you pre-create the subject sheets like this (see attached):

    =LET(d,Master!L2#,f,FILTER(DROP(d,1),TAKE(d,1)=A1),FILTER(f,f<>""))

    or

    =FILTER(Master!A2:A4,BYROW(Master!B2:H4,LAMBDA(r,COUNTIF(r,A1)))=1)
    Attached Files Attached Files
    Last edited by AliGW; 01-20-2024 at 03:39 AM. Reason: Workbook added.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,288

    Re: Combining a variety of data from different columns

    So you still haven't replied here or marked the thread as solved, despite telling me that you have!

    It's extremely discourteous NOT even to acknowledge help given, however small that assistance might have been. On this occasion, I gave you an awful lot.

  4. #4
    Registered User
    Join Date
    01-19-2024
    Location
    glasgow
    MS-Off Ver
    365
    Posts
    12

    Re: Combining a variety of data from different columns

    AliGW, I'm sorry - I realise you have done your best and I thought I had given you the recognition for this. I thought this was done by adding recognition or reputation, unfortunately it appears it's not done in that way. It was not an attempt to be rude or to not recognise you. If you check your reputation, if there is a way to do this, you will see I have commented and added a star to it - apologies if this is not the correct way to do this.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,288

    Re: Combining a variety of data from different columns

    The rep is very kind - thanks. But you added that today.

    In January, I gave you this assistance. That's three months ago. Not ONE word from you back then of recognition, not even a 'thank you'. That's what I find discourteous - it feels pretty much like a smash and grab.

    Please remember that we are all human beings - treat us with the respect that we deserve, please.

    You still need to mark this thread as solved.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,288

    Re: Combining a variety of data from different columns

    OK - so I have marked this as solved on your behalf.

  7. #7
    Registered User
    Join Date
    01-19-2024
    Location
    glasgow
    MS-Off Ver
    365
    Posts
    12

    Re: Combining a variety of data from different columns

    That's ok, we do all forget things from time to time and that's my fault. As I have said, I apologise for that.

+ 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. Replies: 1
    Last Post: 11-02-2023, 10:22 AM
  2. Replies: 0
    Last Post: 08-28-2021, 11:30 AM
  3. Combining data in multiple columns(all columns have same length)into one column
    By nzi0001 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-24-2014, 11:19 AM
  4. Combining two columns of data
    By aubreymcann in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-13-2013, 03:02 PM
  5. Combining data in columns into one row.....
    By Philody in forum Excel General
    Replies: 17
    Last Post: 01-17-2013, 03:09 PM
  6. Merge Variety of Columns
    By ryanb4614 in forum Excel General
    Replies: 3
    Last Post: 09-01-2010, 02:55 PM
  7. [SOLVED] Combining data from two columns
    By dziw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2006, 03:05 PM

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