+ Reply to Thread
Results 1 to 19 of 19

Filtering multiple columns of data into a new location

  1. #1
    Registered User
    Join Date
    06-07-2023
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    23

    Filtering multiple columns of data into a new location

    I have a large (1000's of rows, 100's of columns) data set that is like a validation of permissions. The different columns are the different roles in the organisation, but they start at column 14 as the first 13 columns contain the access descriptions listed vertically in the rows (1000's of them).
    Thus the Yes/No/N/A data will start in cell N2.

    The 13 columns describing the access is because of different modules, areas, focus areas etc.

    What I need is a drop down list of the roles (N1:GA1) on a new sheet (which I can do) which, when each role is selected in turn from the drop down list, it will display the 13 column set of access descriptions for when that role has a Yes, and then underneath all of those, the 13 column set of access descriptions for when the role has No.

    I've tried the filter function, but I can't make it work with choosing the role from the drop down list and displaying all 13 columns for each Yes row.
    No idea what I'm doing

    Any help would be much appreciated.
    I've attached a dummy spreadsheet with hopefully clear comments about what I need.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Filtering multiple columns of data into a new location

    One way, though I imagine it could be neater

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-07-2023
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    23

    Re: Filtering multiple columns of data into a new location

    Works perfectly, thanks so much!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Filtering multiple columns of data into a new location

    You're welcome.



    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon 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 those who helped.

  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Filtering multiple columns of data into a new location

    Quote Originally Posted by TMS View Post
    One way, though I imagine it could be neater
    I think it's a very neat formula. Optionally, you could eliminate the HSTACK function by replacing HSTACK("","","","","") with {"","","",""} only.

  6. #6
    Registered User
    Join Date
    06-07-2023
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    23

    Re: Filtering multiple columns of data into a new location

    Thanks, being a new user, I wasn't aware, sorry, but I've have now 'added reputation' - is that right? Thanks again!
    quick question, if , in my example sheet, some of the topics were blank, then the formula would show 0 in the place of any empty cell (see new attachment).
    How do I get the 0 to just be a blank space?

    Thanks heaps
    Attached Images Attached Images

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Filtering multiple columns of data into a new location

    Thanks for the feedback and rep .

    To replaces the zeros with spaces, please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by HansDouwe; 06-07-2023 at 10:31 PM.

  8. #8
    Registered User
    Join Date
    06-07-2023
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    23

    Re: Filtering multiple columns of data into a new location

    fantastic, works exactly as I need it, you're a legend!
    Thanks so much

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Filtering multiple columns of data into a new location

    Glad to have helped and thanks for the feedback. .

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Filtering multiple columns of data into a new location

    @Mosom: thanks for the rep.

    @Hans: thanks for the suggestion and +rep. Another way to remove the zeroes (and implementing your approach):

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Filtering multiple columns of data into a new location

    @Trevor, Thanks. Oh yes instead of at the beginning it can also be done at the end, but both solutions look a bit silly , but that's the way Excel works. .

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Filtering multiple columns of data into a new location

    … but both solutions look a bit silly , but that's the way Excel works. .
    And so it has always been. I've been doing that for as long as I can remember

  13. #13
    Forum Contributor John Vergara's Avatar
    Join Date
    01-17-2022
    Location
    Colombia
    MS-Off Ver
    365
    Posts
    200

    Re: Filtering multiple columns of data into a new location

    Hi to all!

    Another option could be:
    PHP Code: 
    =LET(d,A2:D11&"",r,XLOOKUP(N1,F1:J1,F2:J11),IFNA(VSTACK(FILTER(d,r="Yes"),"",FILTER(d&"",r="No")),"")) 
    Blessings!
    A out-of-context text is a pretext.
    Consider adding reputation points to all the people who help you with your question/problem.

  14. #14
    Registered User
    Join Date
    06-07-2023
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    23

    Re: Filtering multiple columns of data into a new location

    Hi again,
    Sorry to reopen the question, but I have another query.
    Here is the formula I am using, with the choices of "Can Edit/Delete"; "Can View"; "Can Select" and "No Access"

    =LET(data,IF(Sheet1!A2:M2649="","",Sheet1!A2:M2649),role,INDEX(Sheet1!O2:GB2649,0,MATCH(Sheet2!B1,Sheet1!O1:GB1,0)),VSTACK(FILTER(data,role="Can Edit/Delete"),HSTACK("","","","","","","","","","","","",""),FILTER(data,role="Can View"),HSTACK("","","","","","","","","","","","",""),FILTER(data,role="Can Select",FILTER(data,role="No Access"))))

    It works exactly like I need it to, thanks again!

    But, if I would like to colour code the responses (eg all the Can Edit/Delete filtered responses are red, all the Can View are yellow etc) how do I do that? I can't colour code the original list prior to filtering as different roles would have Can Edit/Delete or Can View or whatever.

    Simple example using original worksheet uploaded has been included.

    Is it a formula? conditional formatting?

    Thanks in advance for your help - last question on this spreadsheet I swear!
    Attached Files Attached Files

  15. #15
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Filtering multiple columns of data into a new location

    Elaborating on John's formula, please try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and set the following two conditional rules (applied to $P$4:$S$16):

    Red:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Green:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    06-07-2023
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    23

    Re: Filtering multiple columns of data into a new location

    Thanks so much! worked great. I did have to tweak the formula (my data has "can edit/delete", "can view", "can select" and "no access" instead of just "Yes" or "No"), but it is a thing of beauty!

    One last question (sorry!!).
    If I had, say for example, a managerial role over the top that covered Role 1 AND Role 2, is there a way to have a new filtered location (over in column Z for example) to show both sets of data?
    See new sheet attached and scroll across to columns X onwards.

    Thanks in advance for any help!
    Attached Files Attached Files

  17. #17
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Filtering multiple columns of data into a new location

    or even sort then together
    If you select 2 roles, what should happen, if there is a "YES" and "NO" in 1 row (for 1 topic-module-area-focus).
    Do you want this topic-module-area-focus in red, green or both?

  18. #18
    Registered User
    Join Date
    06-07-2023
    Location
    Sydney, Australia
    MS-Off Ver
    Office 365
    Posts
    23

    Re: Filtering multiple columns of data into a new location

    Hi, thanks for looking at this again for me. I would like both to start with.
    So it will list all the Yes/No's for Role 1 and underneath all the Yes/No's for Role 2. So there will be some that is a Yes for one Role but a No for another.
    Ultimately I need to know what permissions a role has, so there is a hierarchy - Yes outweighs No, so in terms of sorting and then removing duplicates, keep the Yes version of a Topic/Module/Area/Focus and not the No, so I have a final list of all the unique Yes's and No's that the Manager role has. Does that make sense?

  19. #19
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,435

    Re: Filtering multiple columns of data into a new location

    Please select the roles with a "x" and try for the final list:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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: 5
    Last Post: 03-27-2021, 09:43 AM
  2. VBA to Extract data from Raw data by filtering multiple columns
    By Lianraj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2019, 01:32 AM
  3. Filtering Multiple columns for the same value/data
    By epanal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2017, 08:57 PM
  4. [SOLVED] Macro to copy data from multiple columns to new location and remove duplicates
    By excel151515 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2015, 04:21 PM
  5. [SOLVED] VBA Filtering Columns based on Cell Value for multiple columns
    By MikeRoot in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-31-2014, 08:07 AM
  6. Excel 2007 : Filtering Multiple Columns for Unique Data
    By Ultimist in forum Excel General
    Replies: 1
    Last Post: 06-24-2010, 04:02 AM
  7. Replies: 3
    Last Post: 06-15-2006, 04:20 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