Sub Project_3_EN(ByVal VecType, m, n, m1, n1 As Integer) ' 3_Periodic Table elements_EN ' Updated: 28/11/25 ' Created by: Ariel R. Becerra (10/09/25) ' Modified by: _________________ ' This file contains the code for your new ScienSolar project. ' ============================================================================== ' PROJECT CODE: 3 ' ' INTEGRATION INSTRUCTIONS: ' Note 1: The project number (3) in the function name must match the entry in the CONFIG sheet project list. Update if necessary. ' Note 2: This code will be integrated into the main VBA project to automate project loading and execution. ' Note 3: Generated formulas and values are limited to the first 30 columns. Keep all project data within this range for optimal performance. ' ' STEP-BY-STEP INTEGRATION: ================== ' 1. CONFIG Sheet Setup (for new projects): ' - Navigate to the CONFIG sheet and add a consecutive number to the last row of the projects list (column C, from row 35) ' - Add a descriptive project name in the corresponding language column ' - Replace (if it doesn't match) the number in Sub Project_48 with the new number from the list ' 2. Numbering Validation: ' - Ensure projects in the CONFIG sheet maintain ascending numerical order ' - Only integers are allowed ' 3. VBA Editor Preparation: ' - Open VBA Editor (Alt+F11 Windows / Fn+Option+F11 macOS) ' - Close other workbooks to avoid accidental code placement ' - In the Project Explorer, select an existing module with available space ' - Alternatively, insert a new module (Insert -- > Module) ' 5. Code Implementation: ' - Select all code in this file and copy it ' - Paste at the end of the selected module's code (for new projects) ' - Replace de old code with the new one (for existing projects). Verify the code ' 6. Project Testing: ' - Return to the CONFIG sheet and click 'New Sheet' ' - Select your project from the list and click '+Vector' ' - Large projects require repeated '+Vector' button presses when loading. ' - Verify successful loading in the new sheet ' SUPPORT AND UPDATES: ===================== ' Visit www.sciensolar.com for latest updates and documentation ' © ScienSolar - Advanced Solar Project Management ' ============================================================================== ' Cells(m1 - 1, n1 + 2).FormulaR1C1 = "1" Cells(m1 - 1, n1).Value = "0" Cells(m1 + 0, n1 + 0).FormulaR1C1 = "=IF(R[-1]C=""ENTIRE"",15,33)" Cells(m1 + 0, n1 + 1).FormulaR1C1 = "50" Cells(m1 + 0, n1 + 2).FormulaR1C1 = "=CONFIG!R3C4" Cells(m1 + 0, n1 + 3).FormulaR1C1 = "800" Cells(m1 + 0, n1 + 6).FormulaR1C1 = "=CONFIG!R3C8" Cells(m1 + 0, n1 + 7).FormulaR1C1 = "8" Cells(m1 + 0, n1 + 8).FormulaR1C1 = "Ariel R. Becerra (10/09/25)" Cells(m1 + 1, n1 + 2).FormulaR1C1 = "=CONFIG!R4C4" Cells(m1 + 1, n1 + 3).FormulaR1C1 = "480" 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,2265625 s." Cells(m1 + 2, n1 + 2).FormulaR1C1 = "=CONFIG!R5C4" Cells(m1 + 2, n1 + 3).FormulaR1C1 = "=100/R[5]C[21]" 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 = "E" Cells(m1 + 3, n1 + 1).FormulaR1C1 = "15" 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 = "ELECTROSTATIC FIELD OF THE ELEMENTS OF THE PERIODIC TABLE." & Chr(10) & "" & Chr(10) & "The model calculates the electric field of atoms in the periodic table, both inside and outside of them, using classical physics and without considering the interaction between electrons or electrons with protons. Radii are calculated using Stepler's rules for quantum mechanics. Only the principal quantum number n is taken into account." & Chr(10) & _ " " & Chr(10) & "CELL SETTINGS:" & Chr(10) & "" & Chr(10) & "A11 = insert the x coordinate" & Chr(10) & "B11 = insert the y coordinate" & Chr(10) & "C11 = insert the z coordinate" & Chr(10) & _ " " & Chr(10) & "G18 = position of the first atom at the x coordinate" & Chr(10) & "G19 = position of the first atom at the y coordinate" & Chr(10) & _ " G20 = position of the first atom at the z coordinate" & Chr(10) & "(for other atoms in similar cells at the bottom of the sheet, scroll down)" & Chr(10) & _ " " & Chr(10) & "Field result at a point:" & Chr(10) & "" & Chr(10) & "Resulting Field:" & Chr(10) & "A12 = E_x; B12 = E_y; C12 = E_z; G10 = E" & Chr(10) & "" & Chr(10) & "Field of the first nuclei: A30, B30, C30." & Chr(10) & _ " Field of the first electron: A48, B48, C48. " & Chr(10) & "The same for other nuclei and electrons." On Error Resume Next Cells(m1, n1 + 9).Comment.text text:=HELPtxt ' C—digo para recrear controles Dim ws As Worksheet Set ws = ThisWorkbook.ActiveSheet If m = 3 Then PatronW = ActiveSheet.Cells(1, 1).width PatronH = ActiveSheet.Cells(1, 1).height ' ComboBox Set dd = ws.DropDowns.Add(Left:=Range("D15").Left + Range("$D$15").width * 0, Top:=Range("$D$15").Top, width:=Range("$D$15").width * 2, height:=Range("$D$15").height * 1) With dd .Placement = 2 .name = "Elements15" .LinkedCell = "$G$16" .AddItem "1 Hydrogen" .AddItem "2 Helium" .AddItem "3 Lithium" .AddItem "4 Beryllium" .AddItem "5 Boron" .AddItem "6 Carbon" .AddItem "7 Nitrogen" .AddItem "8 Oxygen" .AddItem "9 Fluorine" .AddItem "10 Neon" .AddItem "11 Sodium" .AddItem "12 Magnesium" .AddItem "13 Aluminum" .AddItem "14 Silicon" .AddItem "15 Phosphorus" .AddItem "16 Sulfur" .AddItem "17 Chlorine" .AddItem "18 Argon" .AddItem "19 Potassium" .AddItem "20 Calcium" .AddItem "21 Scandium" .AddItem "22 Titanium" .AddItem "23 Vanadium" .AddItem "24 Chromium" .AddItem "25 Manganese" .AddItem "26 Iron" .AddItem "27 Cobalt" .AddItem "28 Nickel" .AddItem "29 Copper" .AddItem "30 Zinc" .AddItem "31 Gallium" .AddItem "32 Germanium" .AddItem "33 Arsenic" .AddItem "34 Selenium" .AddItem "35 Bromine" .AddItem "36 Krypton" .AddItem "37 Rubidium" .AddItem "38 Strontium" .AddItem "39 Yttrium" .AddItem "40 Zirconium" .AddItem "41 Niobium" .AddItem "42 Molybdenum" .AddItem "43 Technetium" .AddItem "44 Ruthenium" .AddItem "45 Rhodium" .AddItem "46 Palladium" .AddItem "47 Silver" .AddItem "48 Cadmium" .AddItem "49 Indium" .AddItem "50 Tin" .AddItem "51 Antimony" .AddItem "52 Tellurium" .AddItem "53 Iodine" .AddItem "54 Xenon" .AddItem "55 Cesium" .AddItem "56 Barium" .AddItem "57 Lanthanum" .AddItem "58 Cerium" .AddItem "59 Praseodymium" .AddItem "60 Neodymium" .AddItem "61 Promethium" .AddItem "62 Samarium" .AddItem "63 Europium" .AddItem "64 Gadolinium" .AddItem "65 Terbium" .AddItem "66 Dysprosium" .AddItem "67 Holmium" .AddItem "68 Erbium" .AddItem "69 Thulium" .AddItem "70 Ytterbium" .AddItem "71 Lutetium" .AddItem "72 Hafnium" .AddItem "73 Tantalum" .AddItem "74 Tungsten" .AddItem "75 Rhenium" .AddItem "76 Osmium" .AddItem "77 Iridium" .AddItem "78 Platinum" .AddItem "79 Gold" .AddItem "80 Mercury" .AddItem "81 Thallium" .AddItem "82 Lead" .AddItem "83 Bismuth" .AddItem "84 Polonium" .AddItem "85 Astatine" .AddItem "86 Radon" .AddItem "87 Francium" .AddItem "88 Radium" .AddItem "89 Actinium" .AddItem "90 Thorium" .AddItem "91 Protactinium" .AddItem "92 Uranium" .AddItem "93 Neptunium" .AddItem "94 Plutonium" .AddItem "95 Americium" .AddItem "96 Curium" .AddItem "97 Berkelium" .AddItem "98 Californium" .AddItem "99 Einsteinium" .AddItem "100 Fermium" .AddItem "101 Mendelevium" .AddItem "102 Nobelium" .AddItem "103 Lawrencium" .AddItem "104 Rutherfordium" .AddItem "105 Dubnium" .AddItem "106 Seaborgium" .AddItem "107 Bohrium" .AddItem "108 Hassium" .AddItem "109 Meitnerium" .AddItem "110 Darmstadtium" .AddItem "111 Roentgenium" .AddItem "112 Copernicium" .AddItem "113 Nihonium" .AddItem "114 Flerovium" .AddItem "115 Moscovium" .AddItem "116 Livermorium" .AddItem "117 Tennessine" .AddItem "118 Oganesson" .ListFillRange = "" .Value = 2 .Display3DShading = True End With Set dd = Nothing ' Button ws.Buttons.Add(Left:=Range("F15").Left + Range("$F$15").width * 0, Top:=Range("$F$15").Top, width:=Range("$F$15").width * 1, height:=Range("$F$15").height * 1).Select With Selection .name = "AddButt(15)[68](33)[50]1PT" .OnAction = "PTableRefresh" .text = "Refresh" End With ' ComboBox Set dd = ws.DropDowns.Add(Left:=Range("L8").Left + Range("$L$8").width * 0, Top:=Range("$L$8").Top, width:=Range("$L$8").width * 3.5, height:=Range("$L$8").height * 1) With dd .Placement = 2 .name = "ViewType" .LinkedCell = "$AB$19" .AddItem "1. At a point in space" .AddItem "2: In Cartesian coordinates" .AddItem "3: In Fibonacci-spherical dist." .AddItem "4. In cylindrical coordinates" .AddItem "5. In spherical coordinates" .ListFillRange = "$AB$20:$AB$24" .Value = 1 .Display3DShading = True End With Set dd = Nothing ' Button ws.Buttons.Add(Left:=Range("O8").Left + Range("$O$8").width * 0.5, Top:=Range("$O$8").Top, width:=Range("$O$8").width * 1, height:=Range("$O$8").height * 1).Select With Selection .name = "FieldButton" .OnAction = "Rotate" .text = "" & ChrW(8629) & " Field" End With ' Button ws.Buttons.Add(Left:=Range("G15").Left + Range("$G$15").width * 0, Top:=Range("$G$15").Top, width:=Range("$G$15").width * 1.5, height:=Range("$G$15").height * 1).Select With Selection .name = "AddButt(15)[68](33)[50]2PT" .OnAction = "PTableDuplicateAtom" .text = "Duplicate Atom" End With ' Button ws.Buttons.Add(Left:=Range("H15").Left + Range("$H$15").width * 0.5, Top:=Range("$H$15").Top, width:=Range("$H$15").width * 0.5, height:=Range("$H$15").height * 1).Select With Selection .name = "DelButt(15)[68](33)[50]3PT" .OnAction = "PTableDuplicateAtom" .text = "X" End With ' Opton button Set opt = ws.OptionButtons.Add(Left:=Range("R8").Left + Range("$R$8").width * 0, Top:=Range("$R$8").Top, width:=Range("$R$8").width * 0.5, height:=Range("$R$8").height * 1.5) opt.Caption = "" With opt .name = "YesOptionButt" .LinkedCell = "$T$8" End With Set opt = Nothing ' Opton button Set opt = ws.OptionButtons.Add(Left:=Range("S8").Left + Range("$S$8").width * 0, Top:=Range("$S$8").Top, width:=Range("$S$8").width * 0.5, height:=Range("$S$8").height * 1.5) opt.Caption = "" With opt .name = "NoOptionButt" .LinkedCell = "$T$8" End With Set opt = Nothing ' Button ws.Buttons.Add(Left:=Range("T8").Left + Range("$T$8").width * 0, Top:=Range("$T$8").Top, width:=Range("$T$8").width * 1, height:=Range("$T$8").height * 1).Select With Selection .name = "DelTableButt" .OnAction = "PTCleanTable" .text = "Clear data" End With ' Button ws.Buttons.Add(Left:=Range("H8").Left + Range("$H$8").width * 0, Top:=Range("$H$8").Top, width:=Range("$H$8").width * 1.5, height:=Range("$H$8").height * 1).Select With Selection .name = "RotElecButt" .OnAction = "PTRotateElectrons" .text = " " & ChrW(8634) & " Electrons " & ChrW(8630) & "" End With ' SpinButton Set spin = ws.Spinners.Add(Left:=Range("F8").Left + Range("$F$8").width * 0, Top:=Range("$F$8").Top, width:=Range("$F$8").width * 0.5, height:=Range("$F$8").height * 1) spin.name = "SpinnerB8L" spin.LinkedCell = "$F$8" spin.Min = 20 spin.max = 30000 spin.Value = 40 spin.SmallChange = 2 spin.Value = 40 spin.OnAction = "Rotate" Set spin = Nothing ' SpinButton Set spin = ws.Spinners.Add(Left:=Range("G8").Left + Range("$G$8").width * 0, Top:=Range("$G$8").Top, width:=Range("$G$8").width * 0.5, height:=Range("$G$8").height * 1) spin.name = "SpinnerB8R" spin.LinkedCell = "$G$8" spin.Min = 1 spin.max = 30000 spin.Value = 10 spin.SmallChange = 1 spin.Value = 10 spin.OnAction = "Rotate" Set spin = Nothing ' SpinButton Set spin = ws.Spinners.Add(Left:=Range("G31").Left + Range("$G$31").width * 0, Top:=Range("$G$31").Top, width:=Range("$G$31").width * 0.5, height:=Range("$G$31").height * 1) spin.name = "Spinner 1213" spin.LinkedCell = "$G$31" spin.Min = 0 spin.max = 30000 spin.Value = 0 spin.SmallChange = 1 spin.Value = 0 spin.OnAction = "Rotate" Set spin = Nothing ' SpinButton Set spin = ws.Spinners.Add(Left:=Range("G30").Left + Range("$G$30").width * 0, Top:=Range("$G$30").Top, width:=Range("$G$30").width * 0.5, height:=Range("$G$30").height * 1) spin.name = "Spinner 1214" spin.LinkedCell = "$G$30" spin.Min = 0 spin.max = 30000 spin.Value = 0 spin.SmallChange = 1 spin.Value = 0 spin.OnAction = "Rotate" Set spin = Nothing End If Dim p As Integer For p = 1 To 0 If Range("A5").Value = "Next sub_i" Then Exit Sub Application.Run "Project_3_" & p & "_EN", VecType, m, n, m1, n1 ' Next p If m = m1 + 0 Then ' vector 7 Cells(m + 3, n + -1).FormulaR1C1 = "1" Cells(m + 3, n + 0).FormulaR1C1 = "E" Cells(m + 3, n + 1).FormulaR1C1 = "15" 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 + 3, n + 9).FormulaR1C1 = "Vectors visually modified (magnitude unchanged). Adjust scale in B8" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "183" Cells(m + 4, n + 1).FormulaR1C1 = "=IF(R[12]C[25]=1,"""",IF(R[12]C[25]=2,R[14]C[24],IF(R[12]C[25]=3,R[15]C[24],IF(R[12]C[25]=4,R[16]C[24],IF(R[12]C[25]=5,R[17]C[24])))))" Cells(m + 4, n + 2).FormulaR1C1 = "Electric field of atoms." Cells(m + 4, n + 12).FormulaR1C1 = "The Coulombic Electrostatic Field of Atoms and Their Combinations" Cells(m + 4, n + 24).FormulaR1C1 = "Setup and Instructions" Cells(m + 5, n + -1).FormulaR1C1 = "1" Cells(m + 5, n + 0).FormulaR1C1 = "=IF(R[2]C[24]=1,RC[4] &""*""&RC[5] &""E-11"",RC[4] &""*""&RC[5] &""E+12"")" Cells(m + 5, n + 1).FormulaR1C1 = "0" Cells(m + 5, n + 2).FormulaR1C1 = "Adjust Vector Size:" Cells(m + 5, n + 4).FormulaR1C1 = "40" Cells(m + 5, n + 5).FormulaR1C1 = "10" Cells(m + 5, n + 8).FormulaR1C1 = "View of the field:" Cells(m + 5, n + 15).FormulaR1C1 = "Data:" Cells(m + 5, n + 16).FormulaR1C1 = "Yes" Cells(m + 5, n + 17).FormulaR1C1 = "No" Cells(m + 5, n + 18).FormulaR1C1 = "2" Cells(m + 6, n + -1).FormulaR1C1 = "=SUMIFS(C[2],C[3],""E_*"")" Cells(m + 6, n + 0).FormulaR1C1 = "=SUMIFS(C[-1],C[2],""E_*"")" Cells(m + 6, n + 1).FormulaR1C1 = "=SUMIFS(C[-1],C[1],""E_*"")" Cells(m + 6, n + 2).FormulaR1C1 = "Total charges:" Cells(m + 6, n + 3).FormulaR1C1 = "=COUNTIF(C[-1],""E_*"")" Cells(m + 6, n + 4).FormulaR1C1 = "="" E "" & IF(R[1]C[20]=1,""(V/" & ChrW(197) & ")"",""(V/m)"")&"" =""" Cells(m + 6, n + 5).FormulaR1C1 = "=SQRT(R[3]C[-6]^2+R[3]C[-5]^2+R[3]C[-4]^2)" Cells(m + 6, n + 6).FormulaR1C1 = "=IF(R[10]C[20]=1,"" Edit the observation point in A11, B11, C11)"",IF(R[10]C[20]=2,"" Edit the parameters in SETTINGS (cells Y12 -AC14) -- >> "",IF(R[10]C[20]=3,"" Edit the parameters in SETTINGS (cell AA22) -- >> "",IF(R[10]C[20]=4,"" Edit the parameters in SETTINGS (cells Y14 - AA16) --- >> "",IF(R[10]C[20]=5,"" Edit the parameters in SETTINGS (cells Y15 - AA17) -- >> "","""")))))" Cells(m + 6, n + 14).FormulaR1C1 = "=IF(R[-1]C[4]=1,"" The data is extracted into a table starting with row 46."","""")" Cells(m + 6, n + 20).FormulaR1C1 = "/////////////////////////////////////////////////////// SETTINGS ///////////////////////////////////////////////" 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 + 2).FormulaR1C1 = "Total atoms:" Cells(m + 7, n + 3).FormulaR1C1 = "=COUNTIF(C[-1],""E_0"")" Cells(m + 7, n + 4).FormulaR1C1 = " k =" Cells(m + 7, n + 5).FormulaR1C1 = "=IF(RC[19]=1,0.89875517923*(100000000000000000000),0.89875517923/RC[19])" Cells(m + 7, n + 20).FormulaR1C1 = "___________________________________" Cells(m + 7, n + 23).FormulaR1C1 = " 1 " & ChrW(197) & " =" Cells(m + 7, n + 24).FormulaR1C1 = "1" Cells(m + 7, n + 25).FormulaR1C1 = " _______________________________" 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 = "=""<< --- Enter (x, y, z) "" & IF(R[-1]C[22]=1,""(in Angstrom " & ChrW(197) & ")"",""(in meters)"")" Cells(m + 8, n + 20).FormulaR1C1 = "PERIODIC" Cells(m + 8, n + 21).FormulaR1C1 = "| Field Display Parameters:" Cells(m + 8, n + 25).FormulaR1C1 = " Step:" Cells(m + 8, n + 26).FormulaR1C1 = "| Move the coordinates:" 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 = "=""<< --- Result (Ex, Ey, Ez) "" & IF(R[-2]C[22]=1,""(V/" & ChrW(197) & ")"",""(m)"")" Cells(m + 9, n + 20).FormulaR1C1 = "TABLE" Cells(m + 9, n + 21).FormulaR1C1 = "|" Cells(m + 9, n + 22).FormulaR1C1 = "X_in -X_fin =" Cells(m + 9, n + 23).FormulaR1C1 = "=0*R[-2]C[1]" Cells(m + 9, n + 24).FormulaR1C1 = "=0*R[-2]C" Cells(m + 9, n + 25).FormulaR1C1 = "=0.2*R[-2]C[-1]" Cells(m + 9, n + 26).FormulaR1C1 = "| by x:" Cells(m + 9, n + 27).FormulaR1C1 = "0" Cells(m + 10, n + -1).FormulaR1C1 = "1" Cells(m + 10, n + 0).FormulaR1C1 = "=IF(R[-5]C[18]=1,50,0)" Cells(m + 10, n + 1).FormulaR1C1 = "1" Cells(m + 10, n + 20).FormulaR1C1 = "Hydrogen,Helium,Lithium,Beryllium,Boron,Carbon,Nitrogen,Oxygen,Fluorine,Neon,Sodium,Magnesium,Aluminum,Silicon,Phosphorus,Sulfur,Chlorine,Argon,Potassium,Calcium,Scandium,Titanium,Vanadium,Chromium,Manganese,Iron,Cobalt,Nickel,Copper,Zinc,Gallium,Germanium,Arsenic,Selenium,Bromine,Krypton,Rubidium,Strontium,Yttrium,Zirconium,Niobium,Molybdenum,Technetium,Ruthenium,Rhodium,Palladium,Silver,Cadmium,Indium,Tin,Antimony,Tellurium,Iodine,Xenon,Cesium,Barium, Lanthanum, Cerium, Prasedymium, Neodymium, Promecio," Cells(m + 10, n + 21).FormulaR1C1 = "|" Cells(m + 10, n + 22).FormulaR1C1 = "Y_in -Y_fin =" Cells(m + 10, n + 23).FormulaR1C1 = "=-2.5*R[-3]C[1]" Cells(m + 10, n + 24).FormulaR1C1 = "=2.5*R[-3]C" Cells(m + 10, n + 25).FormulaR1C1 = "=0.3*R[-3]C[-1]" Cells(m + 10, n + 26).FormulaR1C1 = "| by y:" Cells(m + 10, n + 27).FormulaR1C1 = "=0*R[-3]C[-3]" Cells(m + 11, n + -1).FormulaR1C1 = "4" Cells(m + 11, n + 0).FormulaR1C1 = "=IF(R[-6]C[18]=1,10,0)" Cells(m + 11, n + 1).FormulaR1C1 = "1" Cells(m + 11, n + 20).FormulaR1C1 = "Samarium, Europium, Gadolinium, Terbium, Dysprosium, Holmium, Erbium, Thulium, Ytterbium, Lutetium, Hafnium, Tantalum, Tungsten, Rhenium, Osmium, Iridium, Platinum, Gold, Mercury, Thallium, Lead, Bismuth, Polonium, Astatine, Radon, Francium, Radium, Actinium, Thorium, Protactinium, Uranium, Neptunium, Plutonium, Americium, Curium, Berkelium, Californium, Einsteinium, Fermium, Mendelevium, Nobelium, Lawrencium, Rutherfordium, Dubnium, Seaborgium, Bohrium, Hassium, Meitnerium, Darmstadtium, Roentgenium, Copernicium, Nihonium, Flerovium, Moscovium, Livermorium, Tennessine, Oganesson," Cells(m + 11, n + 21).FormulaR1C1 = "|" Cells(m + 11, n + 22).FormulaR1C1 = "Z_in -Z_fin =" Cells(m + 11, n + 23).FormulaR1C1 = "=-2*R[-4]C[1]" Cells(m + 11, n + 24).FormulaR1C1 = "=2*R[-4]C" Cells(m + 11, n + 25).FormulaR1C1 = "=0.2*R[-4]C[-1]" Cells(m + 11, n + 26).FormulaR1C1 = "| by z:" Cells(m + 11, n + 27).FormulaR1C1 = "0" Cells(m + 3, n + 1).Interior.Color = "13998939" Cells(m + 3, n + 1).Font.Size = "14" Cells(m + 3, n + 1).Font.name = "Calibri" Cells(m + 4, n - 1).Value = 1 Cells(m1 + 1, n1 + 1).Value = "+ He" Call AddNewVector End If ' vector ends If m = m1 + 9 Then ' vector 6 Cells(m + 3, n + -1).FormulaR1C1 = "=R[-9]C+1" Cells(m + 3, n + 0).FormulaR1C1 = "=IF(RC[1]<0, ""- "", ""+ "") &R[1]C[3]" Cells(m + 3, n + 1).FormulaR1C1 = "=R[1]C[4]*1.6E-19" Cells(m + 3, n + 2).FormulaR1C1 = "||||||||||||||||||||||||||||||||||||||" Cells(m + 3, n + 5).FormulaR1C1 = "=MID(R[-2]C[15]&R[-1]C[15],IFERROR(FIND(""|"", SUBSTITUTE(R[-2]C[15]&R[-1]C[15], "","",""|"",R[1]C-1)),0)+1,FIND("";"",SUBSTITUTE(R[-2]C[15]&R[-1]C[15], "","","";"",R[1]C))-IFERROR(FIND(""|"", SUBSTITUTE(R[-2]C[15]&R[-1]C[15], "","",""|"",R[1]C-1)),0)-1)" Cells(m + 3, n + 20).FormulaR1C1 = "|1,H,1,|2,He,2," Cells(m + 3, n + 21).FormulaR1C1 = "|" Cells(m + 3, n + 22).FormulaR1C1 = "rho_i -rho_f =" Cells(m + 3, n + 23).FormulaR1C1 = "=1.5*R[-5]C[1]" Cells(m + 3, n + 24).FormulaR1C1 = "1.5" Cells(m + 3, n + 25).FormulaR1C1 = "=0.3*R[-5]C[-1]" Cells(m + 3, n + 26).FormulaR1C1 = "| Color:" Cells(m + 3, n + 27).FormulaR1C1 = "=10/(R[-5]C[-3])" Cells(m + 4, n + -1).FormulaR1C1 = "1" Cells(m + 4, n + 0).FormulaR1C1 = "=9" Cells(m + 4, n + 2).FormulaR1C1 = "Symbol:" Cells(m + 4, n + 3).FormulaR1C1 = "=MID(R15C22&R16C22&R17C22&R18C22&R19C22&R20C22&R21C22,R[26]C[1]+1,R[27]C[1]-R[26]C[1]-1)" Cells(m + 4, n + 4).FormulaR1C1 = " Z =" Cells(m + 4, n + 5).FormulaR1C1 = "2" Cells(m + 4, n + 6).FormulaR1C1 = "=IF(R[1]C[-3]RC[-1],""< - Change element, or remove "" &R[1]C[-3]-RC[-1] & "" electron(s) using the Refresh button."",""""))" Cells(m + 4, n + 20).FormulaR1C1 = "|3,Li,2,1,|4,Be,2,2,|5,B,2,3,|6,C,2,4,|7,N,2,5,|8,O,2,6,|9,F,2,7,|10,Ne,2,8," Cells(m + 4, n + 21).FormulaR1C1 = "|" Cells(m + 4, n + 22).FormulaR1C1 = "phi_i -phi_f =" Cells(m + 4, n + 23).FormulaR1C1 = "0" Cells(m + 4, n + 24).FormulaR1C1 = "360" Cells(m + 4, n + 25).FormulaR1C1 = "10" Cells(m + 4, n + 26).FormulaR1C1 = "| (in AD15 goes the magnitude " 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 + 2).FormulaR1C1 = "Electrons:" Cells(m + 5, n + 3).FormulaR1C1 = "=COUNTIF(C[-1],R[-1]C&R[-2]C[-4]&""_*"")+COUNTIF(C[-1],R[-1]C&""_r_ion"")" Cells(m + 5, n + 5).FormulaR1C1 = "=IF(R[-1]C>RC[-2],R[-1]C[-2]&"" +""&ABS(R[-1]C-RC[-2]),IF(R[-1]C