I have a main workbook and a main worksheet.The values I want changed in the work sheet are the four variables shown above under X and Y in the H and I columns.
I want to create 16 workbooks, each one determined by the geograpic location on the sheet shown in the diagram.They are numbered in the diagram:
m1, m2, m3....P4.
My Question is what is the formula (or area of code) for generating 16 workbooks with each workbook named or numbered (m1,m2 etc) and the variables changed only in the H and I columns as discussed and shown Below.
I have also attached some code that would be helpful in making the workbooks.
I want to create 16 workbooks, each one determined by the geograpic location on the sheet shown in the diagram.They are numbered in the diagram:
m1, m2, m3....P4.
My Question is what is the formula (or area of code) for generating 16 workbooks with each workbook named or numbered (m1,m2 etc) and the variables changed only in the H and I columns as discussed and shown Below.
I have also attached some code that would be helpful in making the workbooks.
PHP:
Sub 2D Plane()
a = (Range("h3") - Range("h2")) / 4
b = (Range("i3") - Range("i2")) / 4
When X1 is present, then a+h2= new
X1 = a+Range("h2") , Range("h2")
X2 = 2*a+Range("h2") , a+Range("h2")
X3 = 3*a+Range("h2") , 2*a+Range("h2")
X4 = Range("h3") , 3*a+Range("h2")
Y1 = b+Range("i2") , Range("i2")
Y2 = 2*b+Range("i2") , b+Range("i2")
Y3 = 3*b+Range("i2") , 2*b+Range("i2")
Y4 = Range("i3") , 3*b+Range("i2")
X1,Y1 = M1
X1,Y2 = M2
X1,Y3 = M3
X1,Y4 = M4
X2,Y1 = N1
X2,Y2 = N2
X2,Y3 = N3
X2,Y4 = N4
X3,Y1 = O1
X3,Y2 = O2
X3,Y3 = O3
X3,Y4 = O4
X4,Y1 = P1
X4,Y2 = P2
X4,Y3 = P3
X4,Y4 = P4
End Sub
Last edited: