Grouping or Combining values

Hello everyone,

I have a scenario as below where I need to group the values based on the values from the datatable.

01,02,03 (individually or in combination of these numbers) – Group 1
08,09,10,11(individually or in combination of these numbers) – Group 2
12,15,54,77,88 (individually or in combination of these numbers) – Group 3
01,08,15,96,99 (any combination of these numbers) – Group 4
Any other number – Group 5

Eg: 01,03 - Group 1
01,08,96 - Group 5
08,09,11 - Group 2 etc
What is the way we can achieve this?

are these in different columns?

It’s a single column in the datatable or I can use an array as well

Hello @nvora

It would be better if you can share a sample excel with the data and the grouped data.

Thanks

Let me know if this helps!

Kindly note: 01 is falling into multiple groups and there is no rule to decide where a 01 belongs to

01, 08 and 15 all belong to 2 groups. So if only 01 appears it will be Group 1 but if it appears in combination of numbers it will be different group (either Group 1 or Group 4).

Eg. 01 only - Group 1
01,03 - Group 1
01,02,03 - Group 1
01, 08, 96 - Group 4
01,08,15,99 - Group 4

Let me know if this helps!