Recounting indices based on ZX axis

So I have a list of planes that have sort of random indices. As seen in the example file I recounted those indices based on the Z value. But on the X axis the couting is still random. How can I recount the indices based on both Z and X values?recount (72.5 KB) (47.4 KB)


Thanks alot!