How to rotate duplicate instances?

Hi again,

I’m trying to create a number of back-to-back rows of shelves (like in a library) and am trying to figure out how best to rotate an entire “assembly” of components and instances, while being able to continue to randomize the components.

I’ve tried a few different ways but not found a solution. I think it has something to do with Realize Instances, but I’m not that familiar with it yet.

Here is the setup:

And here’s what I’m trying to do:

back-to-back2

Further… I’d like to also repeat each row vertically while continuing to randomize, though I think a grid works fine.

Any ideas?

thanks

spin-instnaces.blend (924.3 KB)