You need to explain whole setup ie. whole material and example of mesh.
You also never mentioned this is for instanced static meshes.
So whole setup, so i know what you need, and then can make some better example.
Btw. try out “named reroutes” they really reduce all those wires all over place.