Welcome,
I've got data as shown. My role is to sort them / group them under some conditions simultaneously:
condition no 1: for one group of 'H1' maximum 'PCS' sum is 25 / for H2 is 9 (condition no2 must be kept)
condition no 2: sum of val multiplied by 'PCS' is not greather than 9 for...