+ Reply to Thread
Results 1 to 24 of 24

If cell = then return a list

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

    If cell = then return a list

    Hi All,



    I'm a teacher and want if an excel says a certain class in a cell (Class 2B) for another cell to produce a list of all the pupils in the class (20 pupils) in individual cells.



    I've got all the background data populated, just not sure how to write the formula. Can anyone help? Or would I need to put them all into one cell and then format them into individual?



    Thanks!

  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: If cell = then return a list

    Before I help again, please go and acknowledge the assistance I gave you last time and mark the thread as solved: https://www.excelforum.com/excel-gen...t-columns.html

    Then provide a sample workbook, please.
    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
    Registered User
    Join Date
    01-19-2024
    Location
    glasgow
    MS-Off Ver
    365
    Posts
    12

    Re: If cell = then return a list

    Apologies Ali, I have done this now .
    I've also popped a link here to an excel....unfortunately it doesn't let me post links but the link is the usual bitly start with excelhelp1 at the end.


    Thanks again!

  4. #4
    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: If cell = then return a list

    No - attach the workbook, please. Instructions in the yellow banner at the top of this page. I shan't be following any links.

    No, you have not marked the previous thread as solved, nor have you even replied to it!
    Last edited by AliGW; 04-24-2024 at 06:56 AM.

  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: If cell = then return a list

    Once you attach a workbook here, I shall help you.

  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: If cell = then return a list

    Still waiting for you to attach a workbook - please do so. Make sure it's desensitised.

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

    Re: If cell = then return a list

    Book2.xlsx

    Thank you

  8. #8
    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: If cell = then return a list

    I don't understand. Your workbook says: IF responses sheet cell says 1A then list all pupils in 1A and the tasks they have completed.

    Are you saying that whatever is listed in that sheet needs to be replicated on the results sheet?

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

    Re: If cell = then return a list

    Not quite - I have an ongoing spreadsheet where teachers for example say

    All of "Class A" have completed "Maths Test 1" for example. In the background we know that Test 1 in Maths covers trigonometry, algebra and arithmetic for example.

    All of "Class B" may have completed "Maths Test 2" and in the background we know that this might cover trigonometry, pythagorus and theory.

    My final sheet would then have a list of the pupils in Class 1A having completed trigonometry, algebra and arithmetic and a list of all pupils from Class 1B having completed trigonometry, pythagorus and theory.

    For the end-user it should be simple, full class have completed this test.
    Summary should be individual pupils with the areas covered.

    I hope that makes sense?

  10. #10
    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: If cell = then return a list

    Try this:

    =LET(pc,'Pupil and class info'!A2:B16,r,Responses!B2:D4,HSTACK(INDEX(pc,,2),DROP(REDUCE(0,INDEX(pc,,1),LAMBDA(x,y,VSTACK(x,FILTER(r,Responses!A2:A4=y)))),1)))
    Attached Files Attached Files

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

    Re: If cell = then return a list

    I'm trying to think of an every day example of it...

    In terms of tests and areas covered it would be like going on to "HelloFresh" or equivalent and ordering menu items 2, 4 and 6 and in the background that means HelloFresh will know for packing Item 1 needs an onion, a pepper and chicken packed whilst item 4 needs pasta, eggs and tomatoes.

    I'm not sure if that's a good example or not

  12. #12
    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: If cell = then return a list

    See post #10.

    I was a teacher for 31 years before I retired and a HoD for the final nine of them. I was also the school timetabler.

    Your forum profile still needs updating to 365 - I asked you to do that back in January.

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

    Re: If cell = then return a list

    Thank you, that looks good. I'll put it into our spreadsheet and adapt it to the tables we have.

    To be clear, there was no malice with the previous posts - I do have a history of coming back and saying thank you in other forums so although I forgot it in this instance there was no intention there.

    Thank you again,
    Much appreciated!

  14. #14
    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: If cell = then return a list

    You're welocme, but you still need to update your forum profile, please.

    I cannot be aware of your behaviour on other forums, only your behaviour here. I am sure you don't accept bad manners from your pupils (I never did).

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  15. #15
    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: If cell = then return a list

    Thanks for updating your profile.

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

    Re: If cell = then return a list

    It's not quite doing what I'd like it to on Excel365 but it's certainly gave me a good template to adapt. Thank you!

  17. #17
    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: If cell = then return a list

    In what way is it not quite doing what you want? I have 365 - it will be doing the same for you as it is for me. It produces the results that you showed that you wanted - provide a more detailed workbook with expected results mocked up and I'll take another look. I can't produce solutions for problems that I cannot see.

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

    Re: If cell = then return a list

    Hello,

    I have attached as close to the final sheet as I have below.
    https://glowscotland-my.sharepoint.c...64eKw?e=rfIDxf

    There's a small explanation under the sheet "Introduction" and a perfect picture of outcome under "Final sheet"

    Thank you!

  19. #19
    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: If cell = then return a list

    Please attach the workbook HERE, please.

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

    Re: If cell = then return a list

    Sorry I will get the hang of this eventually!

  21. #21
    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: If cell = then return a list

    There's no pupil and class info, so I cannot link pupils to the correct tasks completed!

    Could you add that and attach again?

  22. #22
    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: If cell = then return a list

    Sorry - found it!

  23. #23
    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: If cell = then return a list

    Right - try this:

    Please Login or Register  to view this content.
    Last edited by AliGW; 04-24-2024 at 11:46 AM. Reason: Workbook added.

  24. #24
    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: If cell = then return a list

    Seen, but no reply ... Hopefully it's OK?

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

+ 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] VLOOKUP - if cell matches list, return value in another cell
    By Jacks18928jl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-14-2023, 07:13 AM
  2. [SOLVED] Trying to compare one cell with a list of cells and return data in adjacent cell on match
    By possumbarnes in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-08-2019, 10:41 AM
  3. Vlookup - If cell contains characters from list, use list to return value
    By xo1darcie1ox in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-22-2016, 03:10 PM
  4. [SOLVED] If cell contains text from a list, return value..
    By MushroomFace in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-06-2015, 09:56 AM
  5. [SOLVED] compare list B with list A, return cell data on row where B matched A
    By master-richie in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-04-2015, 01:59 AM
  6. [SOLVED] Look for a list of keywords in a cell and then return the content of the found cell
    By RasmusClark in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 10-10-2013, 04:50 AM
  7. Return every 3rd cell from list
    By kaokao1 in forum Excel General
    Replies: 2
    Last Post: 01-26-2008, 11:57 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