Sub Project_37_EN(ByVal VecType, m, n, m1, n1 As Integer) ' 37_Coulomb Force charge-line_EN ' Updated: 14/03/25 ' Created by: Ariel R. Becerra (21/11/23) ' Modified by: _________________ ' This is the code of your new project. ' Steps to embed the code to ScienSolar: ' Note 1: The number 37 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 (into the VBA editor) to automate the download of the project. ' Note 3: The formulas and cell values generated here correspond only to the first 30 columns in the sheet. All your formulas and values are recommended to be written in these columns. ' Step 1. Go to the CONFIG sheet (at the end of column C) and add the number of your new project to the last row in the projects list, and a short name in the corresponding langage column. ' 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 ="1" Cells(m1 - 1, n1 ).Value = "" Cells(m1 + 0, n1 + 0).FormulaR1C1 ="=IF(R[-1]C=""ENTIRE"",24,42)" Cells(m1 + 0, n1 + 1).FormulaR1C1 ="59" 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 ="Ariel R. Becerra (21/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 + 0).FormulaR1C1 ="t = 0,0703125 s." Cells(m1 + 2, n1 + 2).FormulaR1C1 ="=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 ="100" 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 ="F" Cells(m1 + 3, n1 + 2).FormulaR1C1 ="=CONFIG!R6C4" Cells(m1 + 3, n1 + 3).FormulaR1C1 ="200" 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 = "CAMPO DE UN CUADRUPOLO ELÄCTRICO" & Chr(10) & _ " (See english version at the end)" & Chr(10) & _ " Un cuadrupolo el_ctrico se puede definir como el conjunto de cuatro cargas puntuales q distribuidas en el espacio. La forma mās sencilla de un cuadrupolo son cuatro cargas distribuidas en los v_rtices de un cuadrado. Para hallar el campo el_ctrico de un cuadrupolo en cualquier punto del espacio, se aplica el principio de superposiciŅn, es decir, en cada punto del espacio el campo el_ctrico del dipolo es la suma vectorial de los campos el_ctricos de las cuatro cargas por aparte: " & Chr(10) & _ " E = E1 + E2 + E3 + E4, E1 = k q1 /r1^2, E2 = k q2 /r2^2, E3 = k q3 /r3^2, E4 = k q4 /r4^2 ." & Chr(10) & _ " En las celdas A84, B84 y C84 estān las componentes para el campo resultante de las cuatro cargas cargas. En las celdas A10, B10 y C210 se introducen las coordenadas en el espacio en donde se ubica la primera carga y en las celdas A21, B21, C21 estān ubicadaa las ecuaciones para calcular el campo el_ctrico de la primera carga: " & Chr(10) & _ " E1x= k q1(x1_x01)/((x1 _ x01)^2 + (y1 _ y01)^2 + (z1 _ z01)^2)^(3/2)" & Chr(10) & _ " E1y = k q1(y1_y01)/((x1 _ x01)^2 + (y1 _ y01)^2 + (z1 _ z01)^2)^(3/)2 " & Chr(10) & _ " E1z= k q1(z1_z01)/((x1 _ x01)^2 + (y1 _ y01)^2 + (z1 _ z01)^2)^(3/2)." & Chr(10) & _ " De manera similar en A28, B28, C28 se introduce la posici[on de la segunda carga y su campo en A39, B39, C39; en A46, B46, C46 la posiciŅn de la tercera carga y su campo en A57, B57, C57, finalmente en A64, B64, C64 la posiciŅn de la tercera carga y su campo en A75, B75, C75. " & Chr(10) & _ " Modifique la magnitud de las cargas y su signo en las celdas C6, C24, C42 y C60, asÕ como el color de su apariencia. Para calcular el campo el_ctrico en cualquier punto del espacio, introduzca las coordenadas del punto en A83, B83, C83 y oprima cualquier botŅn de coordenadas. " & Chr(10) & _ " La configuraciŅn espacial del campo se puede visualizar en diferentes tipos de coordenadas utilizando la celda C79. Para ver el campo en coordenadas esf_ricas coloque C79=s, en cilÕndricas C79=c y en cartesianas C79=o y oprima cualquier botŅn de coordenadas. Modifique a conveniencia los parāmetros del campo en la cadena que aparece en esta misma celda. " & Chr(10) & _ " Para visdualizar el campo el_ctrico resultante con mayor resoluciŅn, en la celda C43 modifique entre los primeros par_ntesis cuadrados el valor, poniendo uno mās peque_o, por ejemplo o[0,5]; entre mā peque_o sea el valor, mejor serā la resoluciŅn pero tardarā mās tiempo en renderizar. Para ver de nuevo los vectores campo solamente en un punto en particular, borre el contenido del la celda C43 y escriba las coordenadas en donde desee ver el campo en las celdas en A83, B83, C83, por ejemplo A47=0, B47=0, C47=3. " & Chr(10) & _ " (ENGLISH)" & Chr(10) & _ " FIELD OF AN ELECTRICAL QUADRUPOLE" & Chr(10) & _ " An electric quadrupole can be defined as the set of four point charges q distributed in space. The simplest form of a quadrupole is four charges distributed at the vertices of a square. To find the electric field of a quadrupole at any point in space, the superposition principle is applied, that is, at each point in space the electric field of the dipole is the vector sum of the electric fields of the four charges separately:" & Chr(10) & _ " E = E1 + E2 + E3 + E4, E1 = k q1 /r1^2, E2 = k q2 /r2^2, E3 = k q3 /r3^2, E4 = k q4 /r4^2 ." & Chr(10) & _ " In cells A84, B84 and C84 are the components of the field resulting from the four charges. In cells A10, B10 and C210 the coordinates in space where the first charge is located are entered and in cells A21, B21, C21 the equations are located to calculate the electric field of the first charge:" & Chr(10) & _ " E1x= k q1(x1_x01)/((x1 _ x01)^2 + (y1 _ y01)^2 + (z1 _ z01)^2)^(3/2)" & Chr(10) & _ " E1y = k q1(y1_y01)/((x1 _ x01)^2 + (y1 _ y01)^2 + (z1 _ z01)^2)^(3/)2" & Chr(10) & _ " E1z= k q1(z1_z01)/((x1 _ x01)^2 + (y1 _ y01)^2 + (z1 _ z01)^2)^(3/2)." & Chr(10) & _ " Similarly in A28, B28, C28 the position of the second charge and its field are entered in A39, B39, C39; in A46, B46, C46 the position of the third charge and its field in A57, B57, C57, finally in A64, B64, C64 the position of the third charge and its field in A75, B75, C75." & Chr(10) & _ " Change the magnitude of the charges and their sign in cells C6, C24, C42 and C60, as well as the color of their appearance. To calculate the electric field at any point in space, enter the coordinates of the point at A83, B83, C83 and press any coordinate button." & Chr(10) & _ " The spatial configuration of the field can be displayed in different types of coordinates using cell C79. To see the field in spherical coordinates, place C79=s, in cylindrical C79=c and in Cartesian C79=o and press any coordinate button. Modify the field parameters in the string that appears in this very cell. To visualize the resulting electric field with greater resolution, in cell C43 modify the value between the first brackets, putting a smaller one, for example o[0,5]; the smaller the value, the better the resolution, but it will take longer to render. To return to seeing the field vectors only at a particular point, delete the contents of cell C43 and type the coordinates where you want to see the field in cells A83, B83, C83, for example A47=0, B47=0, C47 =3." & Chr(10) & _ " " On Error Resume Next Cells(m1 , n1 + 9).Comment.Text Text:= HELPtxt If m = m1 + 0 Then ' vector 10 Cells(m + 3, n + -1).FormulaR1C1 ="1" Cells(m + 3, n + 0).FormulaR1C1 ="F" Cells(m + 3, n + 2).FormulaR1C1 ="=CONFIG!R6C4" Cells(m + 3, n + 3).FormulaR1C1 ="200" 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 ="Coulomb force: charge-distribution" Cells(m + 4, n + 12).FormulaR1C1 ="ELECTRICAL FORCE ON A POINT CHARGE BY CHARGE DISTRIBUTIONS" Cells(m + 4, n + 24).FormulaR1C1 ="THEORY" 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 ="=SUMIFS(C[2],C[3],""F_*"")" Cells(m + 6, n + 0).FormulaR1C1 ="=SUMIFS(C[-1],C[2],""F_*"")" Cells(m + 6, n + 1).FormulaR1C1 ="=SUMIFS(C[-1],C[1],""F_*"")" Cells(m + 7, n + -1).FormulaR1C1 ="=R[1]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[1]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[1]C" Cells(m + 7, n + 21).FormulaR1C1 ="The simulation allows for the three-dimensional calculation and visualization of the electric" Cells(m + 8, n + -1).FormulaR1C1 ="0" Cells(m + 8, n + 0).FormulaR1C1 ="1" Cells(m + 8, n + 1).FormulaR1C1 ="1" Cells(m + 8, n + 2).FormulaR1C1 ="<< -- POSITION OF POINT CHARGE Q" Cells(m + 8, n + 21).FormulaR1C1 ="force experienced by a point charge due to the presence of a linear charge distribution in space." Cells(m + 9, n + -1).FormulaR1C1 ="=R[-3]C[1]" Cells(m + 9, n + 0).FormulaR1C1 ="=R[-3]C[1]" Cells(m + 9, n + 1).FormulaR1C1 ="=R[-3]C[-2]" Cells(m + 9, n + 2).FormulaR1C1 ="<< RESULTANT FORCE (F_x, F_y, F_z)." Cells(m + 9, n + 21).FormulaR1C1 ="The model is based on an initial configuration of ten charges forming a line; however," 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 + 21).FormulaR1C1 ="additional dq charge elements can be added, allowing the total force on the point charge to be" 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 + 2).FormulaR1C1 ="POINT CHARGE:" Cells(m + 11, n + 21).FormulaR1C1 ="calculated at any position in space. The procedure for adding additional charge elements is" 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 = " + Q " Call AddNewVector end if ' vector ends If m = m1 + 9 Then ' vector 9 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 ="=IF(RC[1]<0,""- "",IF(RC[1]>0,"" + "",""""))&"" Q """ Cells(m + 3, n + 1).FormulaR1C1 ="0.000003" Cells(m + 3, n + 2).FormulaR1C1 ="<< -- Q" Cells(m + 3, n + 21).FormulaR1C1 ="described at the end of the text." Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="9" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="0.3" Cells(m + 5, n + 4).FormulaR1C1 ="RESULTANT FORCE " Cells(m + 5, n + 21).FormulaR1C1 ="The total force is calculated using the superposition principle as the vector sum of the forces" Cells(m + 6, n + 4).FormulaR1C1 ="ON Q (N - newtons):" Cells(m + 6, n + 21).FormulaR1C1 ="generated by each charge element (dq) on the point charge:" 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 + 4).FormulaR1C1 ="=IF(OR(R[31]C[1]="""",R[31]C[1]>3,R[31]C[1]=0),"" |F| ="","""")" Cells(m + 7, n + 5).FormulaR1C1 ="=SQRT(R[-7]C[-6]^2+R[-7]C[-5]^2+R[-7]C[-4]^2)" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 9, n + -1).FormulaR1C1 ="2" Cells(m + 9, n + 0).FormulaR1C1 ="2" Cells(m + 9, n + 1).FormulaR1C1 ="36" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 27).FormulaR1C1 ="(Eq-19-1)" 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 + 21).FormulaR1C1 ="where each F_i is determined using Coulomb's law:" Cells(m + 11, n + -1).FormulaR1C1 ="6" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="10" Cells(m + 3, n + 1).Interior.Color = "3506772" Cells(m + 3, n + 1).Font.Size = "12" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "L1 " Call AddNewVector end if ' vector ends If m = m1 + 18 Then ' vector 8 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 ="=""L""&R[1]C[5]&"" """ Cells(m + 3, n + 1).FormulaR1C1 ="1" Cells(m + 3, n + 4).FormulaR1C1 ="////////////////////////////" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 4).FormulaR1C1 ="Line Nr. =" Cells(m + 4, n + 5).FormulaR1C1 ="1" Cells(m + 4, n + 27).FormulaR1C1 ="(Eq-19-2)" 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 ="Q_L1 =" Cells(m + 5, n + 5).FormulaR1C1 ="=R[3]C*R[21]C" Cells(m + 6, n + 4).FormulaR1C1 ="dL =" Cells(m + 6, n + 5).FormulaR1C1 ="0.2" Cells(m + 7, n + -1).FormulaR1C1 ="=R[3]C[6]" Cells(m + 7, n + 0).FormulaR1C1 ="=R[4]C[5]" Cells(m + 7, n + 1).FormulaR1C1 ="=R[5]C[4]" Cells(m + 7, n + 2).FormulaR1C1 ="=""<< -- Position of dq""&(R[-4]C[-3]-1)/2" Cells(m + 7, n + 4).FormulaR1C1 ="k =" Cells(m + 7, n + 5).FormulaR1C1 ="8900000000" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 ="Q Density:" Cells(m + 8, n + 5).FormulaR1C1 ="0.00002" Cells(m + 8, n + 21).FormulaR1C1 ="where:" Cells(m + 9, n + -1).FormulaR1C1 ="=R27C7*COS(RADIANS(R36C7+R39C7*R[-6]C[2]))*SIN(RADIANS(R37C7+R40C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 ="=R27C7*SIN(RADIANS(R36C7+R39C7*R[-6]C[1]))*SIN(RADIANS(R37C7+R40C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 ="=R27C7*COS(RADIANS(R37C7+R40C7*R[-6]C))" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 ="Position of the Line:" Cells(m + 9, n + 21).FormulaR1C1 =" - k is a constant that depends on the system of units and whose value is entered in cell G28," 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 ="x_o =" Cells(m + 10, n + 5).FormulaR1C1 ="0" Cells(m + 10, n + 21).FormulaR1C1 =" - Q is the point charge, " 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 ="y_o =" Cells(m + 11, n + 5).FormulaR1C1 ="2" Cells(m + 11, n + 21).FormulaR1C1 =" - q_i = dq is the charge element of the line," Cells(m + 3, n + 1).Interior.Color = "255" 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 7 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 4).FormulaR1C1 ="z_o =" Cells(m + 3, n + 5).FormulaR1C1 ="0.1" Cells(m + 3, n + 21).FormulaR1C1 =" - r is the distance between the charge element dq and the point charge," 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 ="=R43C7" Cells(m + 5, n + 4).FormulaR1C1 ="Inclination:" Cells(m + 5, n + 21).FormulaR1C1 ="These equations are automatically generated in the model for each load element, and the" Cells(m + 6, n + 4).FormulaR1C1 ="Phi =" Cells(m + 6, n + 5).FormulaR1C1 ="90" Cells(m + 6, n + 21).FormulaR1C1 ="components of the resultant force (F_x, F_y, F_z) are shown in cells A12, B12, and C12," Cells(m + 7, n + -1).FormulaR1C1 ="=R11C1" Cells(m + 7, n + 0).FormulaR1C1 ="=R11C2" Cells(m + 7, n + 1).FormulaR1C1 ="=R11C3" Cells(m + 7, n + 4).FormulaR1C1 ="Theta =" Cells(m + 7, n + 5).FormulaR1C1 ="0" Cells(m + 7, n + 21).FormulaR1C1 ="respectively. The magnitude of the resultant force is shown in cell G19." Cells(m + 8, n + -1).FormulaR1C1 ="1" Cells(m + 8, n + 0).FormulaR1C1 ="1" Cells(m + 8, n + 1).FormulaR1C1 ="1" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 ="Flexion:" Cells(m + 8, n + 21).FormulaR1C1 ="As the number of load elements increases and the length of each element dL approaches zero, this" Cells(m + 9, n + -1).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C,2)+POWER(R11C2-R[-11]C[1],2)+POWER(R11C3-R[-11]C[2],2),3/2))*(R11C1-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 0).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C[-1],2)+POWER(R11C2-R[-11]C,2)+POWER(R11C3-R[-11]C[1],2),3/2))*(R11C2-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 1).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C[-2],2)+POWER(R11C2-R[-11]C[-1],2)+POWER(R11C3-R[-11]C,2),3/2))*(R11C3-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 2).FormulaR1C1 ="=""F_""&R25C7&""_""&(R[-15]C[-3]-1)/2" Cells(m + 9, n + 4).FormulaR1C1 ="Azimuth =" Cells(m + 9, n + 5).FormulaR1C1 ="0" Cells(m + 9, n + 21).FormulaR1C1 ="discrete sum approaches an integral. However, finite magnitudes and quantities are used in this" 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 ="Elevation =" Cells(m + 10, n + 5).FormulaR1C1 ="0" Cells(m + 10, n + 21).FormulaR1C1 ="model. Initially, the force exerted by a few loading elements is analyzed, and the user can add" Cells(m + 11, n + -1).FormulaR1C1 ="4" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 21).FormulaR1C1 ="more elements and modify their configuration using bending angles." Cells(m + 3, n + 1).Interior.Color = "9851952" 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 6 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 ="=IF(R26C7=0,"""",IF(R26C7<0,"" - "","" + ""))" Cells(m + 3, n + 1).FormulaR1C1 ="=R[-18]C+1" Cells(m + 3, n + 4).FormulaR1C1 ="Display F_i vectors:" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 4).FormulaR1C1 ="Yes=0, No=1" Cells(m + 4, n + 5).FormulaR1C1 ="1" 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 + 21).FormulaR1C1 ="Configuraci" & ChrW(243) & "n del Modelo" Cells(m + 6, n + 4).FormulaR1C1 ="Line:" Cells(m + 7, n + -1).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 2).FormulaR1C1 ="=""<< -- Position of dq""&(R[-4]C[-3]-1)/2" Cells(m + 7, n + 4).FormulaR1C1 ="n =" Cells(m + 7, n + 5).FormulaR1C1 ="=COUNTIF(C[-3],""F_""&R[-21]C&""_*"")" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 4).FormulaR1C1 ="L =" Cells(m + 8, n + 5).FormulaR1C1 ="=R[-20]C*R[-1]C" Cells(m + 8, n + 21).FormulaR1C1 ="FUERZA RESULTANTE SOBRE LA CARGA Q:" Cells(m + 9, n + -1).FormulaR1C1 ="=R27C7*COS(RADIANS(R36C7+R39C7*R[-6]C[2]))*SIN(RADIANS(R37C7+R40C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 ="=R27C7*SIN(RADIANS(R36C7+R39C7*R[-6]C[1]))*SIN(RADIANS(R37C7+R40C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 ="=R27C7*COS(RADIANS(R37C7+R40C7*R[-6]C))" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 4).FormulaR1C1 ="=IF(R[10]C[-4]>0,""<-- use these cells."","""")" Cells(m + 9, n + 21).FormulaR1C1 ="Posici" & ChrW(243) & "n de la carga:" Cells(m + 9, n + 26).FormulaR1C1 ="Fuerza resultante:" 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 + 22).FormulaR1C1 ="x_o = " Cells(m + 10, n + 24).FormulaR1C1 =" A11" Cells(m + 10, n + 26).FormulaR1C1 ="F_x = " Cells(m + 10, n + 27).FormulaR1C1 =" A12 " 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 + 22).FormulaR1C1 ="y_o = " Cells(m + 11, n + 24).FormulaR1C1 =" B11" Cells(m + 11, n + 26).FormulaR1C1 ="F_y = " Cells(m + 11, n + 27).FormulaR1C1 =" B12" Cells(m + 3, n + 1).Interior.Color = "255" 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 5 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 22).FormulaR1C1 ="z_o = " Cells(m + 3, n + 24).FormulaR1C1 =" C11" Cells(m + 3, n + 26).FormulaR1C1 ="F_z = " Cells(m + 3, n + 27).FormulaR1C1 =" C12" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 5).FormulaR1C1 ="=IF(R[-2]C=2,""c[10]rho=[90;90]c2[10]phi=[0;360]c3[10]z=[-200;200]color=[8]origin[cart.]=[0;0;0]tfactor=0,00323606s"","""")" Cells(m + 4, n + 21).FormulaR1C1 ="______________________________________________________________________________________________" Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="=R43C7" Cells(m + 5, n + 5).FormulaR1C1 ="=IF(R[-3]C=3,""s[10]r=[150;150]s2[10]phi=[0;360]s3[10]theta=[0;180]color=[8]origin[cart.]=[0;0;0]tfactor=0,003322398s"","""")" Cells(m + 5, n + 21).FormulaR1C1 ="PARAMETERS" Cells(m + 5, n + 26).FormulaR1C1 ="DESCRIPTION" Cells(m + 6, n + 22).FormulaR1C1 =" |F| =" Cells(m + 6, n + 23).FormulaR1C1 =" G19 = " Cells(m + 6, n + 24).FormulaR1C1 ="=ROUND(SQRT(R[-42]C[-25]^2+R[-42]C[-24]^2+R[-42]C[-23]^2),2)" Cells(m + 6, n + 25).FormulaR1C1 ="N" Cells(m + 6, n + 26).FormulaR1C1 ="Magnitude of the resultant force" Cells(m + 7, n + -1).FormulaR1C1 ="=R37C1" Cells(m + 7, n + 0).FormulaR1C1 ="=R37C2" Cells(m + 7, n + 1).FormulaR1C1 ="=R37C3" Cells(m + 7, n + 22).FormulaR1C1 ="No. DE L" & ChrW(205) & "NEA =" Cells(m + 7, n + 23).FormulaR1C1 =" G25 = " Cells(m + 7, n + 24).FormulaR1C1 ="1" Cells(m + 7, n + 26).FormulaR1C1 ="Charge distribution number" Cells(m + 8, n + -1).FormulaR1C1 ="1" Cells(m + 8, n + 0).FormulaR1C1 ="1" Cells(m + 8, n + 1).FormulaR1C1 ="1" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 22).FormulaR1C1 ="Q_L1 =" Cells(m + 8, n + 23).FormulaR1C1 =" G26 = " Cells(m + 8, n + 24).FormulaR1C1 ="0.00001" Cells(m + 8, n + 25).FormulaR1C1 ="C" Cells(m + 8, n + 26).FormulaR1C1 ="Total charge of the first distribution" Cells(m + 9, n + -1).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C,2)+POWER(R11C2-R[-11]C[1],2)+POWER(R11C3-R[-11]C[2],2),3/2))*(R11C1-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 0).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C[-1],2)+POWER(R11C2-R[-11]C,2)+POWER(R11C3-R[-11]C[1],2),3/2))*(R11C2-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 1).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C[-2],2)+POWER(R11C2-R[-11]C[-1],2)+POWER(R11C3-R[-11]C,2),3/2))*(R11C3-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 2).FormulaR1C1 ="=""F_""&R25C7&""_""&(R[-15]C[-3]-1)/2" Cells(m + 9, n + 22).FormulaR1C1 ="dL =" Cells(m + 9, n + 23).FormulaR1C1 =" G27 = " Cells(m + 9, n + 24).FormulaR1C1 ="0.2" Cells(m + 9, n + 25).FormulaR1C1 ="m" Cells(m + 9, n + 26).FormulaR1C1 ="Length of each element of the line" 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 + 22).FormulaR1C1 ="k =" Cells(m + 10, n + 23).FormulaR1C1 =" G28 = " Cells(m + 10, n + 24).FormulaR1C1 ="8900000000" Cells(m + 10, n + 25).FormulaR1C1 ="Nm^2/C^2" Cells(m + 10, n + 26).FormulaR1C1 ="Electric constant" Cells(m + 11, n + -1).FormulaR1C1 ="4" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 22).FormulaR1C1 ="Q Density =" Cells(m + 11, n + 23).FormulaR1C1 ="G29" Cells(m + 11, n + 24).FormulaR1C1 ="0.000002" Cells(m + 11, n + 25).FormulaR1C1 ="C/m" Cells(m + 11, n + 26).FormulaR1C1 ="Density of charge" Cells(m + 3, n + 1).Interior.Color = "9851952" 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 4 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 ="=IF(R26C7=0,"""",IF(R26C7<0,"" - "","" + ""))" Cells(m + 3, n + 1).FormulaR1C1 ="=R[-18]C+1" Cells(m + 3, n + 22).FormulaR1C1 ="x_o =" Cells(m + 3, n + 23).FormulaR1C1 =" G31 = " Cells(m + 3, n + 24).FormulaR1C1 ="0" Cells(m + 3, n + 25).FormulaR1C1 ="m" Cells(m + 3, n + 26).FormulaR1C1 ="Line position in x" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 22).FormulaR1C1 ="y_o =" Cells(m + 4, n + 23).FormulaR1C1 =" G32 = " Cells(m + 4, n + 24).FormulaR1C1 ="2" Cells(m + 4, n + 25).FormulaR1C1 ="m" Cells(m + 4, n + 26).FormulaR1C1 ="Line position in y" 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 ="z_o =" Cells(m + 5, n + 23).FormulaR1C1 =" G33 = " Cells(m + 5, n + 24).FormulaR1C1 ="0.1" Cells(m + 5, n + 25).FormulaR1C1 ="m" Cells(m + 5, n + 26).FormulaR1C1 ="Line position in z" Cells(m + 6, n + 22).FormulaR1C1 ="phi =" Cells(m + 6, n + 23).FormulaR1C1 =" G36 = " Cells(m + 6, n + 24).FormulaR1C1 ="90" Cells(m + 6, n + 25).FormulaR1C1 ="degree" Cells(m + 6, n + 26).FormulaR1C1 ="Initial azimuth angle of the line" Cells(m + 7, n + -1).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 2).FormulaR1C1 ="=""<< -- Position of dq""&(R[-4]C[-3]-1)/2" Cells(m + 7, n + 22).FormulaR1C1 ="theta =" Cells(m + 7, n + 23).FormulaR1C1 =" G37 = " Cells(m + 7, n + 24).FormulaR1C1 ="0" Cells(m + 7, n + 25).FormulaR1C1 ="degree" Cells(m + 7, n + 26).FormulaR1C1 ="Initial polar angle of the line" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 22).FormulaR1C1 ="Azimuth =" Cells(m + 8, n + 23).FormulaR1C1 =" G39 = " Cells(m + 8, n + 24).FormulaR1C1 ="0" Cells(m + 8, n + 25).FormulaR1C1 ="degree" Cells(m + 8, n + 26).FormulaR1C1 ="Azimuth increment" Cells(m + 9, n + -1).FormulaR1C1 ="=R27C7*COS(RADIANS(R36C7+R39C7*R[-6]C[2]))*SIN(RADIANS(R37C7+R40C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 ="=R27C7*SIN(RADIANS(R36C7+R39C7*R[-6]C[1]))*SIN(RADIANS(R37C7+R40C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 ="=R27C7*COS(RADIANS(R37C7+R40C7*R[-6]C))" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 22).FormulaR1C1 ="Elevation =" Cells(m + 9, n + 23).FormulaR1C1 =" G40 = " Cells(m + 9, n + 24).FormulaR1C1 ="0" Cells(m + 9, n + 25).FormulaR1C1 ="degree" Cells(m + 9, n + 26).FormulaR1C1 ="Polar increment" 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 + 22).FormulaR1C1 ="S" & ChrW(205) & " = 0, NO = 1" Cells(m + 10, n + 23).FormulaR1C1 =" G43 = " Cells(m + 10, n + 24).FormulaR1C1 ="1" Cells(m + 10, n + 26).FormulaR1C1 ="Display the force vectors of each dL" 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 + 22).FormulaR1C1 ="n =" Cells(m + 11, n + 23).FormulaR1C1 =" G46 = " Cells(m + 11, n + 24).FormulaR1C1 ="=COUNTIF(C[-22],""F_""&R[-43]C[-19]&""_*"")" Cells(m + 11, n + 26).FormulaR1C1 ="Number of dL in the distribution" Cells(m + 3, n + 1).Interior.Color = "255" 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 3 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 22).FormulaR1C1 ="L =" Cells(m + 3, n + 23).FormulaR1C1 =" G47 = " Cells(m + 3, n + 24).FormulaR1C1 ="=R[-42]C[-19]*R[-23]C[-19]" Cells(m + 3, n + 25).FormulaR1C1 ="m" Cells(m + 3, n + 26).FormulaR1C1 ="Line length" 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 ="=R43C7" Cells(m + 5, n + 22).FormulaR1C1 ="Quantity:" Cells(m + 5, n + 23).FormulaR1C1 =" B2 = " Cells(m + 5, n + 24).FormulaR1C1 ="8" Cells(m + 5, n + 26).FormulaR1C1 ="Number of elements to add to the line" Cells(m + 6, n + 22).FormulaR1C1 ="Start row:" Cells(m + 6, n + 23).FormulaR1C1 =" B3 = " Cells(m + 6, n + 24).FormulaR1C1 ="42" Cells(m + 6, n + 26).FormulaR1C1 ="Range of the object to duplicate (dL element)" Cells(m + 7, n + -1).FormulaR1C1 ="=R37C1" Cells(m + 7, n + 0).FormulaR1C1 ="=R37C2" Cells(m + 7, n + 1).FormulaR1C1 ="=R37C3" Cells(m + 7, n + 22).FormulaR1C1 ="End row:" Cells(m + 7, n + 23).FormulaR1C1 =" C3 = " Cells(m + 7, n + 24).FormulaR1C1 ="59" Cells(m + 7, n + 26).FormulaR1C1 ="Range of the object to duplicate (dL element)" Cells(m + 8, n + -1).FormulaR1C1 ="1" Cells(m + 8, n + 0).FormulaR1C1 ="1" Cells(m + 8, n + 1).FormulaR1C1 ="1" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 22).FormulaR1C1 ="Quantity:" Cells(m + 8, n + 23).FormulaR1C1 =" B2 = " Cells(m + 8, n + 24).FormulaR1C1 ="ENTIRE" Cells(m + 8, n + 26).FormulaR1C1 ="Duplicate an entire line." Cells(m + 9, n + -1).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C,2)+POWER(R11C2-R[-11]C[1],2)+POWER(R11C3-R[-11]C[2],2),3/2))*(R11C1-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 0).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C[-1],2)+POWER(R11C2-R[-11]C,2)+POWER(R11C3-R[-11]C[1],2),3/2))*(R11C2-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 1).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C[-2],2)+POWER(R11C2-R[-11]C[-1],2)+POWER(R11C3-R[-11]C,2),3/2))*(R11C3-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 2).FormulaR1C1 ="=""F_""&R25C7&""_""&(R[-15]C[-3]-1)/2" 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 + 21).FormulaR1C1 ="Adding or Removing Charge Elements" Cells(m + 11, n + -1).FormulaR1C1 ="4" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 11, n + 21).FormulaR1C1 =" - To add a new charge element dq, press the **+OBJ** button." Cells(m + 3, n + 1).Interior.Color = "9851952" 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 2 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 ="=IF(R26C7=0,"""",IF(R26C7<0,"" - "","" + ""))" Cells(m + 3, n + 1).FormulaR1C1 ="=R[-18]C+1" Cells(m + 3, n + 21).FormulaR1C1 =" - To delete a charge element, use the **-OBJ** button." Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 21).FormulaR1C1 =" - The total number of charge elements is displayed in cell **G46**." 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 + 21).FormulaR1C1 ="- The smaller dL and the greater the number of dq elements, the closer the resulting force will" Cells(m + 6, n + 21).FormulaR1C1 ="be to the actual value." Cells(m + 7, n + -1).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 0).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 1).FormulaR1C1 ="=R[-18]C+R[-16]C" Cells(m + 7, n + 2).FormulaR1C1 ="=""<< -- Position of dq""&(R[-4]C[-3]-1)/2" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 ="- To add or remove multiple elements at once, enter the number of elements in cell **B2** before" Cells(m + 9, n + -1).FormulaR1C1 ="=R27C7*COS(RADIANS(R36C7+R39C7*R[-6]C[2]))*SIN(RADIANS(R37C7+R40C7*R[-6]C[2]))" Cells(m + 9, n + 0).FormulaR1C1 ="=R27C7*SIN(RADIANS(R36C7+R39C7*R[-6]C[1]))*SIN(RADIANS(R37C7+R40C7*R[-6]C[1]))" Cells(m + 9, n + 1).FormulaR1C1 ="=R27C7*COS(RADIANS(R37C7+R40C7*R[-6]C))" Cells(m + 9, n + 2).FormulaR1C1 ="=IF(R[-5]C[-1]>1,"" <-- Field formulae"","""")" Cells(m + 9, n + 21).FormulaR1C1 ="pressing the corresponding button. This number must be an integer." Cells(m + 10, n + -1).FormulaR1C1 ="1" Cells(m + 10, n + 0).FormulaR1C1 ="0" Cells(m + 10, n + 1).FormulaR1C1 ="1" 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 + 21).FormulaR1C1 ="Adding a New Distribution" Cells(m + 3, n + 1).Interior.Color = "255" 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 1 Cells(m + 3, n + -1).FormulaR1C1 ="=R[-9]C+1" Cells(m + 3, n + 21).FormulaR1C1 ="It is possible to add a new, independent distribution (e.g., another charged line). To do this:" Cells(m + 4, n + -1).FormulaR1C1 ="1" Cells(m + 4, n + 0).FormulaR1C1 ="183" Cells(m + 4, n + 21).FormulaR1C1 ="1. In cell **B2**, type **ENTIRE** (B2 = ENTIRE), indicating that the entire row will be copied." Cells(m + 5, n + -1).FormulaR1C1 ="1" Cells(m + 5, n + 0).FormulaR1C1 ="1" Cells(m + 5, n + 1).FormulaR1C1 ="=R43C7" Cells(m + 5, n + 21).FormulaR1C1 ="2. In cell **B3**, enter the number of the first row corresponding to the distribution (for example, B3 = 15)." Cells(m + 6, n + 21).FormulaR1C1 ="3. In cell **C3**, enter the number of the last row containing the distribution elements (i.e.," Cells(m + 7, n + -1).FormulaR1C1 ="=R37C1" Cells(m + 7, n + 0).FormulaR1C1 ="=R37C2" Cells(m + 7, n + 1).FormulaR1C1 ="=R37C3" Cells(m + 7, n + 21).FormulaR1C1 ="the number of the last non-empty row in column **A**)." Cells(m + 8, n + -1).FormulaR1C1 ="1" Cells(m + 8, n + 0).FormulaR1C1 ="1" Cells(m + 8, n + 1).FormulaR1C1 ="1" Cells(m + 8, n + 2).FormulaR1C1 ="=IF(R[-4]C[-1]>1,"" <-- Variable coordinates"","""")" Cells(m + 8, n + 21).FormulaR1C1 ="4. Press the **+OBJ** button." Cells(m + 9, n + -1).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C,2)+POWER(R11C2-R[-11]C[1],2)+POWER(R11C3-R[-11]C[2],2),3/2))*(R11C1-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 0).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C[-1],2)+POWER(R11C2-R[-11]C,2)+POWER(R11C3-R[-11]C[1],2),3/2))*(R11C2-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 1).FormulaR1C1 ="=1/(POWER(POWER(R11C1-R[-11]C[-2],2)+POWER(R11C2-R[-11]C[-1],2)+POWER(R11C3-R[-11]C,2),3/2))*(R11C3-R[-11]C)*R28C7*R26C7*R15C3/R46C7" Cells(m + 9, n + 2).FormulaR1C1 ="=""F_""&R25C7&""_""&(R[-15]C[-3]-1)/2" Cells(m + 9, n + 21).FormulaR1C1 ="5. Scroll through the sheet, locate the cells in the new distribution, and modify their initial" 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 + 21).FormulaR1C1 ="position and configuration. The new distribution will be a copy of the existing one." Cells(m + 11, n + -1).FormulaR1C1 ="4" Cells(m + 11, n + 0).FormulaR1C1 ="0" Cells(m + 11, n + 1).FormulaR1C1 ="1" Cells(m + 3, n + 1).Interior.Color = "9851952" 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 = 10 end if ' vector ends If m = m1 + 81 Then Call BlackWhiteDesk Call PutEqBut end if ' actualizar hoja End Sub