Sub Project_18_ES(ByVal VecType, m, n, m1, n1 As Integer) ' 18_Lente_ES ' Updated: 30/03/24 ' Created by: (22/11/23) ' Modified by: _________________ ' This is the code of your new project. ' Steps to embed the code to ScienSolar: ' Note 1: The number 18 in the name of this function must match the one in the list of the CONFIG sheet for this project. If not, please correct it. ' Note 2: This code will be integrated into the main code to automate the download of the project. ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns from INICIO to the right in the sheet. All your formulas and values are recommended to be written in these columns. ' Step 1. Go to the CONFIG sheet and add a short name and the number of your new project to the last row in the projects list. ' Step 2. Make sure that the list of projects in CONFIG sheet has the correct ascending numbering. ' Step 4. Open the VBA editor (Alt + F11 in Windows or Fn + Option + F11 in macOS). To avoid mistakes, make sure you only have one workbook open. ' Step 5. On the left, in the project explorer, select a non full module (or add a new one). ' Step 6. Select all the code in this file, copy and paste it at the end of the existing code in the module (or in the new one). ' Step 7. To load the project and to check it in a new sheet, go to the CONFIG sheet and click the New Sheet button, then select the project from the list and click the +Vector button. ' Step 8. Click any XYZ button to get the project in the coordinate system. Enjoy it! ' Visit www.sciensolar.com for news and updates of ? ScienSolar. Cells(m1 - 1, n1 + 2).FormulaR1C1 = "2" Cells(m1 + 0, n1 + 2).FormulaR1C1 = "=CONFIG!R3C4" Cells(m1 + 0, n1 + 3).FormulaR1C1 = "850" Cells(m1 + 0, n1 + 6).FormulaR1C1 = "=CONFIG!R3C8" Cells(m1 + 0, n1 + 7).FormulaR1C1 = "8" Cells(m1 + 0, n1 + 8).FormulaR1C1 = " (22/11/23)" Cells(m1 + 1, n1 + 2).FormulaR1C1 = "=CONFIG!R4C4" Cells(m1 + 1, n1 + 3).FormulaR1C1 = "400" Cells(m1 + 1, n1 + 4).FormulaR1C1 = "=CONFIG!R4C6" Cells(m1 + 1, n1 + 5).FormulaR1C1 = "0" Cells(m1 + 1, n1 + 6).FormulaR1C1 = "=CONFIG!R4C8" Cells(m1 + 1, n1 + 7).FormulaR1C1 = "45" Cells(m1 + 2, n1 + 2).FormulaR1C1 = "=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 = "1" Cells(m1 + 2, n1 + 4).FormulaR1C1 = "=CONFIG!R5C6" Cells(m1 + 2, n1 + 5).FormulaR1C1 = "15" Cells(m1 + 2, n1 + 6).FormulaR1C1 = "=CONFIG!R5C8" Cells(m1 + 2, n1 + 7).FormulaR1C1 = "0" Cells(m1 + 3, n1 + 0).FormulaR1C1 = "=IF(R[28]C[5]=1,"""",""Objeto"")" Cells(m1 + 3, n1 + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 = "=CONFIG!R6C5" Cells(m1 + 3, n1 + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m1 + 3, n1 + 5).FormulaR1C1 = "15" Cells(m1, n1 + 9).FormulaR1C1 = "HELP" Dim HELPtxt As String HELPtxt = "IMAGEN DE UNA LENTE CONVEXA Y DE UNA LENTE C" & ChrW(211) & "NCAVA" & Chr(10) & _ " El modelo muestra c" & ChrW(243) & "mo se puede construir la imagen en una lente de un objeto que tiene una posici" & ChrW(243) & "n y orientaci" & ChrW(243) & "n arbitrarias delante de la lente. " & Chr(10) & _ " Tanto el objeto como la imagen se representan con flechas. La construcci" & ChrW(243) & "n se hace por medio de dos haces que salen de la parte superior del objeto, uno de ellos pasa por un punto determinado de la lente y el otro por el origen. Al trasladar el primer haz paralelamente hasta el origen, este va a intersectarse con el plano focal de la lente en un punto determinado. Este punto de intersecci" & ChrW(243) & "n es por donde pasar" & ChrW(225) & " el primer haz y su proyecci" & ChrW(243) & "n hasta que se intersecte con el segundo haz (que pas" & ChrW(243) & " por el origen) determinar" & ChrW(225) & " el punto superior de la imagen. Para determinar el punto en donde inicia la imagen se procede de la misma manera con otros dos haces. " & Chr(10) & _ " " & Chr(10) & _ " (ENGLISH)" & Chr(10) & _ " IMAGE OF A CONVEX LENS AND A CONCAVE LENS" & Chr(10) & _ " The model shows how the image can be constructed in a lens of an object having an arbitrary position and orientation in front of the lens." & Chr(10) & _ " Both the object and the image are represented by arrows. The construction is carried out by means of two rays that come out of the upper part of the object, one of them passes through a certain point of the lens and the other through the origin. By translating the first ray parallel to the origin, it will intersect the focal plane of the lens at a certain point. This intersection point is where the first ray will pass and its projection to the intersection with the second ray (which passed through the origin) will determine the top point of the image. To determine the point where the image begins, proceed in the same way with two other rays." & Chr(10) & _ " Press the >> C button to view the system from different views." & Chr(10) & _ " You will observe how the image moves with the displacement of the focal length. Modify different parameters and observe the behavior of the lens. To return to the initial parameters, click Reset and reload the model." Cells(m1, n1 + 9).Comment.Text Text:=HELPtxt If m = m1 + 0 Then ' vector 17 Cells(m + 3, n + -1).FormulaR1C1 = "1" Cells(m + 3, n + 0).FormulaR1C1 = "=IF(R[28]C[5]=1,"""",""Objeto"")" Cells(m + 3, n + 2).FormulaR1C1 = "=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 = "=CONFIG!R6C5" Cells(m + 3, n + 4).FormulaR1C1 = "=CONFIG!R6C6" Cells(m + 3, n + 5).FormulaR1C1 = "15" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 2).FormulaR1C1 = "Imagen de una lente" Cells(m + 4, n + 12).FormulaR1C1 = "IMAGEN PRODUCIDA POR UNA LENTE" Cells(m + 4, n + 24).FormulaR1C1 = "INSTRUCCIONES" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 6, n + -1).FormulaR1C1 = "=SIN(RADIANS(R[13]C[6]))" Cells(m + 6, n + 0).FormulaR1C1 = "=COS(RADIANS(R[13]C[5]))" Cells(m + 7, n + -1).FormulaR1C1 = "=R[2]C[6]" Cells(m + 7, n + 0).FormulaR1C1 = "=R[3]C[5]" Cells(m + 7, n + 1).FormulaR1C1 = "=R[4]C[4]" Cells(m + 7, n + 4).FormulaR1C1 = "OBJETO|||||||||||||||||" Cells(m + 8, n + -1).FormulaR1C1 = "=SIN(RADIANS(R[5]C[6]))" Cells(m + 8, n + 0).FormulaR1C1 = "=COS(RADIANS(R[5]C[5]))" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "Posici" & ChrW(243) & "n:" Cells(m + 8, n + 7).FormulaR1C1 = "TIPO DE LENTE:" Cells(m + 8, n + 21).FormulaR1C1 = "Para construir la imagen de un objeto que se encuentra en el mismo plano que la lente (plano YZ) " Cells(m + 9, n + -1).FormulaR1C1 = "=R[3]C[6]*R[-1]C[1]*R[-3]C" Cells(m + 9, n + 0).FormulaR1C1 = "=R[3]C[5]*R[-1]C[-1]" Cells(m + 9, n + 1).FormulaR1C1 = "=R[3]C[4]*R[-1]C[-1]*R[-3]C[-1]" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 = " x. =" Cells(m + 9, n + 5).FormulaR1C1 = "30" Cells(m + 9, n + 7).FormulaR1C1 = "=IF(R[11]C[-2]>0,"" C O N V E X A "",IF(R[11]C[-2]<0, "" C " & ChrW(211) & " N C A V A "","" V I D R I O P L A N O ""))" Cells(m + 9, n + 21).FormulaR1C1 = "y que est" & ChrW(225) & " inclinado un " & ChrW(225) & "ngulo determinado con respecto a la vertical (celda G16) se procede de la " Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[5]C[4]" Cells(m + 10, n + 4).FormulaR1C1 = " y =" Cells(m + 10, n + 5).FormulaR1C1 = "-100" Cells(m + 10, n + 21).FormulaR1C1 = "siguiente manera para la lente convexa:" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = " z =" Cells(m + 11, n + 5).FormulaR1C1 = "0" Cells(m + 11, n + 22).FormulaR1C1 = "Se toman dos haces de luz que salen de la cabeza del objeto, uno que pasa por el centro " Cells(m + 3, n + 1).Interior.Color = "13434777" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 9 Then ' vector 16 Cells(m + 3, n + -1).FormulaR1C1 = "2" Cells(m + 3, n + 0).FormulaR1C1 = "=IF(R[19]C[5]=1,"""",""Imagen"")" Cells(m + 3, n + 1).FormulaR1C1 = "_120" Cells(m + 3, n + 4).FormulaR1C1 = "Altura =" Cells(m + 3, n + 5).FormulaR1C1 = "40" Cells(m + 3, n + 22).FormulaR1C1 = "de la lente y el otro que se dirige a la lente y se encuentra con ella a una altura " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "Inclinaci" & ChrW(243) & "n:" Cells(m + 4, n + 5).FormulaR1C1 = "=R[-11]C[2]" Cells(m + 4, n + 22).FormulaR1C1 = "determinada (celda G25). La direcci" & ChrW(243) & "n del primer haz no cambia despu" & ChrW(233) & "s de pasar por la " Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 4).FormulaR1C1 = "FIJAR TRAYECTORIA|||||||" Cells(m + 5, n + 22).FormulaR1C1 = "lente. Para determinar el camino del segundo haz se traza un eje " & ChrW(243) & "ptico auxiliar (G32) " Cells(m + 6, n + 4).FormulaR1C1 = "S" & ChrW(205) & "=2, NO=1" Cells(m + 6, n + 5).FormulaR1C1 = "1" Cells(m + 6, n + 22).FormulaR1C1 = "paralelo al haz y que pase por centro de la lente, proyect" & ChrW(225) & "ndolo hacia el plano focal." Cells(m + 7, n + -1).FormulaR1C1 = "=R[90]C+R[92]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[90]C+R[92]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[90]C+R[92]C" Cells(m + 7, n + 22).FormulaR1C1 = "El punto de intersecci" & ChrW(243) & "n del eje auxiliar con el plano focal es prec" & ChrW(237) & "samente el foco auxiliar, " Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "SISTEMA|||||||||||||||||" Cells(m + 8, n + 22).FormulaR1C1 = "a trav" & ChrW(233) & "s del cual debe pasar el segundo haz despu" & ChrW(233) & "s de su refracci" & ChrW(243) & "n en la lente. " Cells(m + 9, n + -1).FormulaR1C1 = "=-R[90]C+R[63]C+R[-9]C" Cells(m + 9, n + 0).FormulaR1C1 = "=-R[90]C+R[63]C+R[-9]C" Cells(m + 9, n + 1).FormulaR1C1 = "=-R[90]C+R[63]C+R[-9]C" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 = "Alto lente:" Cells(m + 9, n + 5).FormulaR1C1 = "150" Cells(m + 9, n + 22).FormulaR1C1 = "Estos dos haces se encuentran en un punto, el cual es el punto en donde" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "=R[-4]C[4]" Cells(m + 10, n + 4).FormulaR1C1 = "" & ChrW(193) & "ngulo incl.:" Cells(m + 10, n + 5).FormulaR1C1 = "0" Cells(m + 10, n + 22).FormulaR1C1 = "se encuentra la cabeza de la imagen. Se procede de la misma manera para encontrar " Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "Dist. focal:" Cells(m + 11, n + 5).FormulaR1C1 = "50" Cells(m + 11, n + 22).FormulaR1C1 = "la cola de la imagen. " Cells(m + 3, n + 1).Interior.Color = "49407" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 18 Then ' vector 15 Cells(m + 3, n + -1).FormulaR1C1 = "3" Cells(m + 3, n + 4).FormulaR1C1 = "Altura cruce rayo-lente:" Cells(m + 3, n + 21).FormulaR1C1 = "Para el caso de la lente c" & ChrW(243) & "ncava el proceso de construcci" & ChrW(243) & "n de los haces es similar, con la diferencia " Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "Altura:" Cells(m + 4, n + 5).FormulaR1C1 = "50" Cells(m + 4, n + 21).FormulaR1C1 = "de que el haz que va paralelo al eje auxiliar, despu" & ChrW(233) & "s de refractarse en la lente, sigue de tal manera " Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 4).FormulaR1C1 = "Grosor del rayo (0 -5):" Cells(m + 5, n + 21).FormulaR1C1 = "que su prolongaci" & ChrW(243) & "n pasa por el foco auxiliar, este " & ChrW(250) & "ltimo siendo la intersecci" & ChrW(243) & "n del plano focal " Cells(m + 6, n + 4).FormulaR1C1 = "Rayo 1:" Cells(m + 6, n + 5).FormulaR1C1 = "1" Cells(m + 6, n + 21).FormulaR1C1 = "con el eje auxiliar (como en el caso anterior)." Cells(m + 7, n + -1).FormulaR1C1 = "=R[-18]C" Cells(m + 7, n + 0).FormulaR1C1 = "0" Cells(m + 7, n + 1).FormulaR1C1 = "0" Cells(m + 7, n + 4).FormulaR1C1 = "Rayo 2:" Cells(m + 7, n + 5).FormulaR1C1 = "1" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 = "||||||||||||||||||||||||" Cells(m + 8, n + 21).FormulaR1C1 = "EJEMPLO DE LENTE CONVEXA:" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-9]C[6]*R[-21]C" Cells(m + 9, n + 0).FormulaR1C1 = "0" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-9]C[4]*R[-21]C[-1]" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 22).FormulaR1C1 = "Distancia focal: " Cells(m + 9, n + 25).FormulaR1C1 = "G23 = 50" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "MOSTRAR (S" & ChrW(205) & "=0, NO=1):" Cells(m + 10, n + 22).FormulaR1C1 = "Posici" & ChrW(243) & "n del objeto:" Cells(m + 10, n + 25).FormulaR1C1 = "G13 = -100" Cells(m + 10, n + 26).FormulaR1C1 = "(imagen real)" Cells(m + 11, n + -1).FormulaR1C1 = "=IF(R23C7<0,5,3)" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "2" Cells(m + 11, n + 4).FormulaR1C1 = "Eje auxiliar:" Cells(m + 11, n + 5).FormulaR1C1 = "1" Cells(m + 11, n + 22).FormulaR1C1 = "Posici" & ChrW(243) & "n del objeto:" Cells(m + 11, n + 25).FormulaR1C1 = "G13 = -20" Cells(m + 11, n + 26).FormulaR1C1 = "(imagen virtual)" Cells(m + 3, n + 1).Interior.Color = "65535" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 27 Then ' vector 14 Cells(m + 3, n + -1).FormulaR1C1 = "4" Cells(m + 3, n + 0).FormulaR1C1 = "=IF(R[1]C[5]=1,"""",""Lente"")" Cells(m + 3, n + 4).FormulaR1C1 = "Plano focal:" Cells(m + 3, n + 5).FormulaR1C1 = "0" Cells(m + 3, n + 22).FormulaR1C1 = "eje auxiliar:" Cells(m + 3, n + 25).FormulaR1C1 = "G32 = 0" Cells(m + 3, n + 26).FormulaR1C1 = "(0= mostrar, 1= ocultar eje auxiliar)" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 4).FormulaR1C1 = "Etiquetas:" Cells(m + 4, n + 5).FormulaR1C1 = "1" Cells(m + 4, n + 22).FormulaR1C1 = "Plano focal:" Cells(m + 4, n + 25).FormulaR1C1 = "G33=0" Cells(m + 4, n + 26).FormulaR1C1 = "(0= mostrar, 1= ocultarplano focal)" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 22).FormulaR1C1 = "Etiquetas:" Cells(m + 5, n + 25).FormulaR1C1 = "G34=0" Cells(m + 5, n + 26).FormulaR1C1 = "(0= mostrar, 1= ocultar etiquetas)" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 21).FormulaR1C1 = "Oprima los botones de ejecutar la simulaci" & ChrW(243) & "n para ver la imagen de diferentes inclinaciones del " Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 = "objeto. Oprima G18 =2 (verifique que G16=I5) y oprima ejecutar para congelar el recorrido tanto" Cells(m + 9, n + -1).FormulaR1C1 = "=-R[-9]C" Cells(m + 9, n + 0).FormulaR1C1 = "=-R[-9]C" Cells(m + 9, n + 1).FormulaR1C1 = "=-R[-9]C" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 21).FormulaR1C1 = "del objeto como de la imagen. " Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "=IF(R23C7<0,5,3)" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R[-9]C" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 11, n + 21).FormulaR1C1 = "EJEMPLO DE LENTE C" & ChrW(211) & "NCAVA:" Cells(m + 3, n + 1).Interior.Color = "65535" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 36 Then ' vector 13 Cells(m + 3, n + -1).FormulaR1C1 = "5" Cells(m + 3, n + 0).FormulaR1C1 = "=IF(R[-8]C[5]=1,"""",""Plano focal"")" Cells(m + 3, n + 2).FormulaR1C1 = "6" Cells(m + 3, n + 3).FormulaR1C1 = "0" Cells(m + 3, n + 22).FormulaR1C1 = "Distancia focal: " Cells(m + 3, n + 25).FormulaR1C1 = "G23 = -50" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 22).FormulaR1C1 = "Posici" & ChrW(243) & "n del objeto:" Cells(m + 4, n + 25).FormulaR1C1 = "G13 = -100" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "6" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-11]C[4]" Cells(m + 5, n + 22).FormulaR1C1 = "eje auxiliar:" Cells(m + 5, n + 25).FormulaR1C1 = "G32 = 0" Cells(m + 5, n + 26).FormulaR1C1 = "(0= mostrar, 1= ocultar eje auxiliar)" Cells(m + 6, n + -1).FormulaR1C1 = "t=" Cells(m + 6, n + 22).FormulaR1C1 = "Plano focal:" Cells(m + 6, n + 25).FormulaR1C1 = "G33=0" Cells(m + 6, n + 26).FormulaR1C1 = "(0= mostrar, 1= ocultarplano focal)" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-18]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-18]C+R[-23]C[5]" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-18]C" Cells(m + 7, n + 22).FormulaR1C1 = "Etiquetas:" Cells(m + 7, n + 25).FormulaR1C1 = "G34=0" Cells(m + 7, n + 26).FormulaR1C1 = "(0= mostrar, 1= ocultar etiquetas)" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-18]C" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-18]C" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-18]C" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 21).FormulaR1C1 = "Oprima los botones de ejecutar la simulaci" & ChrW(243) & "n para ver la imagen de diferentes inclinaciones del " Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 10, n + 21).FormulaR1C1 = "objeto (verifique que G16=I5) ." Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "16777215" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 45 Then ' vector 12 Cells(m + 3, n + -1).FormulaR1C1 = "6" Cells(m + 3, n + 2).FormulaR1C1 = "1" Cells(m + 3, n + 3).FormulaR1C1 = "0" Cells(m + 3, n + 21).FormulaR1C1 = "Para experimentar diferentes distancias focales consecutivamente, coloque G16 = 0 y G23 =I5-50" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 21).FormulaR1C1 = "(la celda I5 es el contador). Verifique que G18 = 1. Oprima el bot" & ChrW(243) & "n Ejecutar o los botones " Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "6" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-20]C[4]" Cells(m + 5, n + 21).FormulaR1C1 = "contiguos a este para analizar diferentes planos focales. " Cells(m + 6, n + -1).FormulaR1C1 = "t=" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-9]C" Cells(m + 7, n + 21).FormulaR1C1 = "Puede oprimir XYZ y el bot" & ChrW(243) & "n C para rotar todo el sistema " & ChrW(243) & "ptico 360 grados. " Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 = "(Las ecuaciones con las que se construy" & ChrW(243) & " el modelo est" & ChrW(225) & "n analizadas en los libros de ScienSolar.)" Cells(m + 9, n + -1).FormulaR1C1 = "=-R[-9]C" Cells(m + 9, n + 0).FormulaR1C1 = "=-R[-9]C" Cells(m + 9, n + 1).FormulaR1C1 = "=-R[-9]C" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "16777215" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 54 Then ' vector 11 Cells(m + 3, n + -1).FormulaR1C1 = "7" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-11]C[2]" Cells(m + 5, n + 2).FormulaR1C1 = "2" Cells(m + 5, n + 3).FormulaR1C1 = "0" Cells(m + 6, n + 0).FormulaR1C1 = "=(R[-35]C-R[-53]C-R[-33]C/R[-33]C[1]*(R[-35]C[1]-R[-53]C[1]))/(R[3]C-R[-33]C*R[3]C[1]/R[-33]C[1])" Cells(m + 6, n + 2).FormulaR1C1 = "3" Cells(m + 6, n + 3).FormulaR1C1 = "0" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-54]C+R[-52]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-54]C+R[-52]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-54]C+R[-52]C" Cells(m + 7, n + 2).FormulaR1C1 = "4" Cells(m + 7, n + 3).FormulaR1C1 = "0" Cells(m + 8, n + 2).FormulaR1C1 = "5" Cells(m + 8, n + 3).FormulaR1C1 = "0" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-41]C[6]*R[-57]C-R[-54]C" Cells(m + 9, n + 0).FormulaR1C1 = "=-R[-56]C-R[-54]C" Cells(m + 9, n + 1).FormulaR1C1 = "=(R[-41]C[4]+1)*R[-57]C[-1]-R[-54]C-R[-56]C" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R27C7" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "15773696" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 63 Then ' vector 10 Cells(m + 3, n + -1).FormulaR1C1 = "8" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-9]C[2]" Cells(m + 7, n + -1).FormulaR1C1 = "=R[54]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[54]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[54]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=R[54]C*R126C2" Cells(m + 9, n + 0).FormulaR1C1 = "=R[54]C*R126C2" Cells(m + 9, n + 1).FormulaR1C1 = "=R[54]C*R126C2" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R27C7" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "15773696" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 72 Then ' vector 9 Cells(m + 3, n + -1).FormulaR1C1 = "9" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-17]C[2]" Cells(m + 7, n + -1).FormulaR1C1 = "=R[54]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[54]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[54]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=R[54]C*R128C2" Cells(m + 9, n + 0).FormulaR1C1 = "=R[54]C*R128C2" Cells(m + 9, n + 1).FormulaR1C1 = "=R[54]C*R128C2" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R27C7" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "15773696" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 81 Then ' vector 8 Cells(m + 3, n + -1).FormulaR1C1 = "10" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-25]C[2]" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-81]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-81]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-81]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-27]C*R63C2" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-27]C*R63C2" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-27]C*R63C2" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R28C7" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "16777215" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 90 Then ' vector 7 Cells(m + 3, n + -1).FormulaR1C1 = "11" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-33]C[2]" Cells(m + 7, n + -1).FormulaR1C1 = "=R[45]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[45]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[45]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=R[45]C*R144C2" Cells(m + 9, n + 0).FormulaR1C1 = "=R[45]C*R144C2" Cells(m + 9, n + 1).FormulaR1C1 = "=R[45]C*R144C2" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R28C7" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "16777215" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 99 Then ' vector 6 Cells(m + 3, n + -1).FormulaR1C1 = "12" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-65]C[2]" Cells(m + 7, n + -1).FormulaR1C1 = "=R[45]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[45]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[45]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=R[45]C*R146C2+0.001" Cells(m + 9, n + 0).FormulaR1C1 = "=R[45]C*R146C2+0.001" Cells(m + 9, n + 1).FormulaR1C1 = "=R[45]C*R146C2+0.001" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "=R28C7" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "16777215" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Call AddNewVector End If ' vector ends If m = m1 + 108 Then ' vector 5 Cells(m + 3, n + -1).FormulaR1C1 = "13" Cells(m + 3, n + 0).FormulaR1C1 = "=IF(R[-80]C[5]=1,"""",""Eje auxiliar"")" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "6" Cells(m + 5, n + 1).FormulaR1C1 = "=R[-84]C[4]" Cells(m + 6, n + 0).FormulaR1C1 = "=(R[-94]C[5]-R[-89]C-R[-87]C/R[-87]C[1]*(R[-89]C[1]-R[-107]C[1]))/(R[-51]C-R[-87]C*R[-51]C[1]/R[-87]C[1])" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-90]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-90]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-90]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=R[-54]C*R117C2" Cells(m + 9, n + 0).FormulaR1C1 = "=R[-54]C*R117C2" Cells(m + 9, n + 1).FormulaR1C1 = "=R[-54]C*R117C2" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "2" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "16777215" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "AUX1" Call AddNewVector End If ' vector ends If m = m1 + 117 Then ' vector 4 Cells(m + 3, n + -1).FormulaR1C1 = "0" Cells(m + 3, n + 0).FormulaR1C1 = "AUX1" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 6, n + -1).FormulaR1C1 = "t=" Cells(m + 6, n + 0).FormulaR1C1 = "=(R[10]C-R[1]C-R[12]C/R[12]C[1]*(R[10]C[1]-R[1]C[1]))/(R[3]C-R[12]C*R[3]C[1]/R[12]C[1])" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-63]C+R[-61]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-63]C+R[-61]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-63]C+R[-61]C" Cells(m + 8, n + -1).FormulaR1C1 = "s=" Cells(m + 8, n + 0).FormulaR1C1 = "=R[-1]C[1]/R[10]C[1]-R[8]C[1]/R[10]C[1]+R[1]C[1]/R[10]C[1]*R[-2]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=(-R[-104]C[6]*R[-120]C+R[-9]C)" Cells(m + 9, n + 0).FormulaR1C1 = "=(R[-99]C+R[-9]C)" Cells(m + 9, n + 1).FormulaR1C1 = "=(-(R[-104]C[4]+1)*R[-120]C[-1]+R[-9]C)" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "1" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "4" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "5287936" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "AUX2" Call AddNewVector End If ' vector ends If m = m1 + 126 Then ' vector 3 Cells(m + 3, n + -1).FormulaR1C1 = "0" Cells(m + 3, n + 0).FormulaR1C1 = "AUX2" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "1" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-126]C+R[-124]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-126]C+R[-124]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-126]C+R[-124]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=(-R[-126]C)" Cells(m + 9, n + 0).FormulaR1C1 = "=(-R[-2]C)" Cells(m + 9, n + 1).FormulaR1C1 = "=(-R[-2]C+0.01)" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "5287936" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "AUX3" Call AddNewVector End If ' vector ends If m = m1 + 135 Then ' vector 2 Cells(m + 3, n + -1).FormulaR1C1 = "0" Cells(m + 3, n + 0).FormulaR1C1 = "AUX3" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "1" Cells(m + 6, n + -1).FormulaR1C1 = "t=" Cells(m + 6, n + 0).FormulaR1C1 = "=(R[10]C-R[1]C-R[12]C*POWER(R[12]C[1],-1)*(R[10]C[1]-R[1]C[1]))/(R[3]C-R[12]C*R[3]C[1]*POWER(R[12]C[1],-1))" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-54]C+R[-52]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-54]C+R[-52]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-54]C+R[-52]C" Cells(m + 8, n + -1).FormulaR1C1 = "s=" Cells(m + 8, n + 0).FormulaR1C1 = "=R[-1]C[1]/R[10]C[1]-R[8]C[1]/R[10]C[1]+R[1]C[1]/R[10]C[1]*R[-2]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=-R[-54]C+R[-135]C+R[-81]C+R[-18]C" Cells(m + 9, n + 0).FormulaR1C1 = "=-R[-54]C+R[-135]C+R[-81]C+R[-18]C" Cells(m + 9, n + 1).FormulaR1C1 = "=-R[-54]C+R[-135]C+R[-81]C+R[-18]C" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "16777215" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "AUX4" Call AddNewVector End If ' vector ends If m = m1 + 144 Then ' vector 1 Cells(m + 3, n + -1).FormulaR1C1 = "0" Cells(m + 3, n + 0).FormulaR1C1 = "AUX4" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "1" Cells(m + 5, n + 1).FormulaR1C1 = "1" Cells(m + 7, n + -1).FormulaR1C1 = "=R[-144]C" Cells(m + 7, n + 0).FormulaR1C1 = "=R[-144]C" Cells(m + 7, n + 1).FormulaR1C1 = "=R[-144]C" Cells(m + 8, n + 2).FormulaR1C1 = "=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 = "=(R[-144]C-R[-144]C)" Cells(m + 9, n + 0).FormulaR1C1 = "=(R[-144]C-R[-20]C)" Cells(m + 9, n + 1).FormulaR1C1 = "=(R[-144]C-R[-20]C)+0.0001" Cells(m + 9, n + 2).FormulaR1C1 = "=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "0" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 4).FormulaR1C1 = "=IF(RC[-4]>0,"" For aditional formula (FA),"","""")" Cells(m + 11, n + -1).FormulaR1C1 = "3" Cells(m + 11, n + 0).FormulaR1C1 = "0" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 4).FormulaR1C1 = "=IF(R[-1]C[-4]>0,""<-- use these cells."","""")" Cells(m + 3, n + 1).Interior.Color = "16777215" Cells(m + 3, n + 1).Font.Size = "11" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "" Cells(m1 + 2, n1 - 1).Value = 17 End If ' vector ends If m = m1 + 144 Then Call BlackWhiteDesk Call PutEqBut End If ' actualizar hoja End Sub