Mike, I made one small tweak to your macro so that all y scales have a common increment and no. of minor ticks. Hope that was okay.
Mike
OriginLab
def RescaleAll
{
lay -o %1 {lay -a}; // rescale selected layer to show all data
yy1=layer%1.y.from; // lower limit in chosen layer
yy2=layer%1.y.to; //upper limit in chosen layer
yyinc=layer%1.y.inc; // scale increment of selected layer
yymT=layer%1.y.minorTicks; // no of minor ticks
// apply same limits to all layers
loop (i,1,page.nlayers)
{
layer$(i).y.from=yy1;
layer$(i).y.to=yy2;
layer$(i).y.inc=yyinc;
layer$(i).y.minorTicks=yymT;
};
};