dear all

i have the following sorting problem.
column b&c; d&e, f&g and h&i define x and y coordinates of an object at a given timepoint (column a). the x&y are randomly distributed allong the row.

now i want to sort the x&y coordinates to fit into a predefined square according to their value.

for instance:
cell 1 should only contain x y values located in the square defined with the coordinates ([x,y], [0,0], [150,0], [0, 150], [150, 150]).
cell 2 - [151, 0], [300,0], [151, 150], [300, 150]
cell 3 - [0, 151], [151, 151], [0,300], [150, 300]
cell 4 - [151, 151], [300,151], [151,300], [300, 300]

i attached a excel spread sheet with an example input and the desired output
Tracking.xlsx

thank you very much for your help!