Dynamic components split

hello ! sorry to ask you to help me again, but above all no one can help me but you.

I have a shelf frame, I want when Len X size is greater than 120, the back cover will automatically divide by vertical panels 1,2,3, and vice versa when Len z is greater than 240, the back cover will automatically divide by horizontal panels 1,2,3 by distance z ,1,2,3! I send you a sample that is easy to visualize, hope you can help me solve these problems, thank you very much!

The “spilt” is created by internal copying of the sizes less than equal to the maximum. Internal copies and sizes are not the problem, but working out how to cover all the configurations is.
The attached file has a DC that allows for a maximum of five bays (distance between partitions) where the backing sheet can cover more than one bay if less than maximum sheet width

adjustable backboards carcase.skp (145.1 KB)

thanks philip if it wasn’t for you i would not have been able to understand the DC formula, i have been searching for the answer and helpless with it, only you can help me answer the question, once again thank you!