Grouping data part 2

Rbd340

New Member
Joined
Oct 11, 2017
Messages
13
Hi guys,

This is a continuation of the following topic. (https://www.mrexcel.com/forum/excel-questions/1029670-grouping-data.html) In hindsight I could have probably explained my challenge a little better and this is my attempt in doing so. For my work we have a system where we have multiple users within groups called subscriptions. I've created an Excel to showcase my problem here: https://www.dropbox.com/s/s4c0tilwhqtbtk6/Example 2.0.xlsx?dl=0

The Goal

To divide the users into groups with a subscriptions. I have multiple sheets with information about the user (sign permission per account, account rights, companies he has access to and more) and if all the data of two users within a subscription is the same I can group them. If not the user will be in a different group.

The challenge

Normally I would do this in Excel, but I have to do this grouping multiple times and doing this in script will save me a lot of time. Another challenge is that some users have access to more than 3000 accounts, thus you can’t concatenate all in one cell since it would be more than 32.000 characters.
I’ve made an example Excel with two tabs with the data (Current xx). My end result is in the Overview tab. The first subscription has 2 users with the same info in both sheets so they go to the same group. The last subscription has 4 users with different permissions so they go in different groups.

The way I currently try to solve the problem is:

  1. Insert a row after B
  2. Concatenate the user info per row into one cell in row C
  3. Insert a row after C
  4. Combine the concatenate each row if the row above is from the same user in row D (=if(a1&b1=a2&b2;D1&”,”&C2;C2))
  5. Insert a row after D
  6. Check length of row D (=LEN(D2)) in row E
  7. Sort row E high to low
  8. Remove duplicates based on column A &B
  9. Do this for all sheets
  10. Vlookup all the results in all sheets into the overview
  11. Compare them and if the same group them

But I think and hope that you can help me with a quicker and more efficient solution. Any help would be greatly appreciated.

Kind regards,
Ricardo
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
... if all the data of two users within a subscription is the same I can group them.
In that case, why have you put all users in subscription 114 in different groups?
As far as I can make out, 3 of them (users 26555922, 76223672 & 97582305) all have identical details. I have highlighted them below. What is it about them that should cause them to be in different groups?


Book1
ABCDEFGHIJK
20811426555922NL65529252-EURYYYYYNNN
20911426555922NL32666-EURYYYYYYYY
21011426555922NL7662262992-EURYYYYYNNN
21111465586233NL65529252-EURYNNNNNNN
21211465586233NL32666-EURYNNNNNNN
21311465586233NL7662262992-EURYNNNNNNN
21411476223672NL65529252-EURYYYYYNNN
21511476223672NL32666-EURYYYYYYYY
21611476223672NL7662262992-EURYYYYYNNN
21711497582305NL65529252-EURYYYYYNNN
21811497582305NL32666-EURYYYYYYYY
21911497582305NL7662262992-EURYYYYYNNN
Current Account Permissions1



Book1
ABCDEFGHIJKLMNOPQRSTU
19211426555922NL65529252-EURUnlimited
19311426555922NL32666-EURUnlimitedUnlimited
19411476223672NL65529252-EURUnlimited
19511476223672NL32666-EURUnlimitedUnlimited
19611497582305NL65529252-EURUnlimited
19711497582305NL32666-EURUnlimitedUnlimited
Current sign level


Also, please be careful with your descriptions - especially the case trying to understand an unfamiliar, complex problem. In the descriptions below, you appear to be using the word row, sometimes to mean row and sometimes to mean column - quite confusing.
The way I currently try to solve the problem is:

  1. Insert a row after B
  2. Concatenate the user info per row into one cell in row C
  3. Insert a row after C
  4. Combine the concatenate each row if the row above is from the same user in row D (=if(a1&b1=a2&b2;D1&”,”&C2;C2))
  5. Insert a row after D
  6. Check length of row D (=LEN(D2)) in row E
  7. Sort row E high to low
  8. Remove duplicates based on column (ah, column at last ;)) A &B
  9. Do this for all sheets
  10. Vlookup all the results in all sheets into the overview
  11. Compare them and if the same group them
 
Upvote 0

Forum statistics

Threads
1,224,834
Messages
6,181,243
Members
453,026
Latest member
cknader

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top