drhgsangani
New Member
- Joined
- Aug 14, 2013
- Messages
- 12
<!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent> <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> <w:DontGrowAutofit/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:LatentStyles DefLockedState="false" LatentStyleCount="156"> </w:LatentStyles> </xml><![endif]--><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ansi-language:#0400; mso-fareast-language:#0400; mso-bidi-language:#0400;} </style> <![endif]--><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026"/> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]-->
Dear all,
i have prepared code by following excel steps.
it is too lengthy (it must require shortning), i don't know how to prepare code for border.
in the code, one part is text & formulas and other part is to bordering it.
Problem with the code are;
1) the code is starting from Range("A1").
i want it should run it on any cell of the sheet.
2) the value is also set for sr. no 1 to 20.
i want it should ask me like "how many items in table?"
3) the same code runs only one time in sheet.
i want it should runs for n times, means it should ask me like "how many tables?"
thanks in advance.
following is the code:
Sub Evaluation()
'
Columns("A:A").ColumnWidth = 3.86
Columns("B:B").ColumnWidth = 23.14
Columns("C:C").ColumnWidth = 9.29
Columns("D:D").ColumnWidth = 7.71
Columns("E:E").ColumnWidth = 6.29
Columns("F:F").ColumnWidth = 7
Columns("G:G").ColumnWidth = 9.14
Columns("H:H").ColumnWidth = 7.43
Columns("I:I").ColumnWidth = 13.43
Columns("J:J").ColumnWidth = 7
Columns("K:K").ColumnWidth = 11.86
Columns("L:L").ColumnWidth = 5.86
Columns("M:M").ColumnWidth = 9.43
Columns("N:N").ColumnWidth = 8.57
Range("A3").FormulaR1C1 = "Sr"
Range("A4").FormulaR1C1 = "No"
Range("A5").FormulaR1C1 = "1"
Range("A6").FormulaR1C1 = "2"
Range("A7").FormulaR1C1 = "3"
Range("A8").FormulaR1C1 = "4"
Range("A9").FormulaR1C1 = "5"
Range("A10").FormulaR1C1 = "6"
Range("A11").FormulaR1C1 = "7"
Range("A12").FormulaR1C1 = "8"
Range("A13").FormulaR1C1 = "9"
Range("A14").FormulaR1C1 = "10"
Range("A15").FormulaR1C1 = "11"
Range("A16").FormulaR1C1 = "12"
Range("A17").FormulaR1C1 = "13"
Range("A18").FormulaR1C1 = "14"
Range("A19").FormulaR1C1 = "15"
Range("A20").FormulaR1C1 = "16"
Range("A21").FormulaR1C1 = "17"
Range("A22").FormulaR1C1 = "18"
Range("A23").FormulaR1C1 = "19"
Range("A24").FormulaR1C1 = "20"
Range("A27").FormulaR1C1 = "Calculations :"
Range("B1").FormulaR1C1 = "Value1 "
Range("B3").FormulaR1C1 = "Name"
Range("B25").FormulaR1C1 = "Value2 : "
Range("B28").FormulaR1C1 = "Value3"
Range("C3").FormulaR1C1 = "Value4"
Range("C4").FormulaR1C1 = "Value5"
Range("C28").FormulaR1C1 = "=IF(ISERROR(R[-3]C/RC[8]*100),"""",R[-3]C/RC[8]*100)"
Range("D3").FormulaR1C1 = "Value6 "
Range("D4").FormulaR1C1 = "Value7"
Range("D5").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D6").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D7").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D8").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D9").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D10").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D11").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D12").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D13").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D14").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D15").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D16").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D17").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D18").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D19").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D20").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D21").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D22").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D23").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D24").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D25").FormulaR1C1 = _
"For Print, hide red text columns (D,E, F, H, J & L) and empty rows"
Range("D28").FormulaR1C1 = "Value8"
Range("E4").FormulaR1C1 = "Value9"
Range("F4").FormulaR1C1 = "Value10"
Range("F28").FormulaR1C1 = "Value11"
Range("G3").FormulaR1C1 = "Value12"
Range("G4").FormulaR1C1 = "Value13"
Range("G5").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G6").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G7").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G8").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G9").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G10").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G11").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G12").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G13").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G14").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G15").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G16").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G17").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G18").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G19").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G20").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G21").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G22").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G23").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G24").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("H4").FormulaR1C1 = "Value14"
Range("H5").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H6").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H7").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H8").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H9").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H10").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H11").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H12").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H13").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H14").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H15").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H16").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H17").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H18").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H19").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H20").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H21").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H22").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H23").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H24").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("I3").FormulaR1C1 = "Value15"
Range("I4").FormulaR1C1 = "Value16"
Range("I5").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I6").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I7").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I8").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I9").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I10").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I11").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I12").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I13").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I14").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I15").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I16").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I17").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I18").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I19").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I20").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I21").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I22").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I23").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I24").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I28").FormulaR1C1 = "Value17"
Range("J4").FormulaR1C1 = "Value18"
Range("J5").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J6").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J7").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J8").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J9").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J10").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J11").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J12").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J13").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J14").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J15").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J16").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J17").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J18").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J19").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J20").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J21").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J22").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J23").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J24").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("K3").FormulaR1C1 = "Value19"
Range("K4").FormulaR1C1 = "Value20"
Range("K5").FormulaR1C1 = _
"=IF(ISERROR(RC[-8]/R[20]C[-8]),"""",RC[-8]/R[20]C[-8])"
Range("K6").FormulaR1C1 = _
"=IF(ISERROR(R[-1]C*RC[-2]/R[-1]C[-8]),"""",R[-1]C*RC[-2]/R[-1]C[-8])"
Range("K7").FormulaR1C1 = _
"=IF(ISERROR(R[-2]C*RC[-2]/R[-2]C[-8]),"""",R[-2]C*RC[-2]/R[-2]C[-8])"
Range("K8").FormulaR1C1 = _
"=IF(ISERROR(R[-3]C*RC[-2]/R[-3]C[-8]),"""",R[-3]C*RC[-2]/R[-3]C[-8])"
Range("K9").FormulaR1C1 = _
"=IF(ISERROR(R[-4]C*RC[-2]/R[-4]C[-8]),"""",R[-4]C*RC[-2]/R[-4]C[-8])"
Range("K10").FormulaR1C1 = _
"=IF(ISERROR(R[-5]C*RC[-2]/R[-5]C[-8]),"""",R[-5]C*RC[-2]/R[-5]C[-8])"
Range("K11").FormulaR1C1 = _
"=IF(ISERROR(R[-6]C*RC[-2]/R[-6]C[-8]),"""",R[-6]C*RC[-2]/R[-6]C[-8])"
Range("K12").FormulaR1C1 = _
"=IF(ISERROR(R[-7]C*RC[-2]/R[-7]C[-8]),"""",R[-7]C*RC[-2]/R[-7]C[-8])"
Range("K13").FormulaR1C1 = _
"=IF(ISERROR(R[-8]C*RC[-2]/R[-8]C[-8]),"""",R[-8]C*RC[-2]/R[-8]C[-8])"
Range("K14").FormulaR1C1 = _
"=IF(ISERROR(R[-9]C*RC[-2]/R[-9]C[-8]),"""",R[-9]C*RC[-2]/R[-9]C[-8])"
Range("K15").FormulaR1C1 = _
"=IF(ISERROR(R[-10]C*RC[-2]/R[-10]C[-8]),"""",R[-10]C*RC[-2]/R[-10]C[-8])"
Range("K16").FormulaR1C1 = _
"=IF(ISERROR(R[-11]C*RC[-2]/R[-11]C[-8]),"""",R[-11]C*RC[-2]/R[-11]C[-8])"
Range("K17").FormulaR1C1 = _
"=IF(ISERROR(R[-12]C*RC[-2]/R[-12]C[-8]),"""",R[-12]C*RC[-2]/R[-12]C[-8])"
Range("K18").FormulaR1C1 = _
"=IF(ISERROR(R[-13]C*RC[-2]/R[-13]C[-8]),"""",R[-13]C*RC[-2]/R[-13]C[-8])"
Range("K19").FormulaR1C1 = _
"=IF(ISERROR(R[-14]C*RC[-2]/R[-14]C[-8]),"""",R[-14]C*RC[-2]/R[-14]C[-8])"
Range("K20").FormulaR1C1 = _
"=IF(ISERROR(R[-15]C*RC[-2]/R[-15]C[-8]),"""",R[-15]C*RC[-2]/R[-15]C[-8])"
Range("K21").FormulaR1C1 = _
"=IF(ISERROR(R[-16]C*RC[-2]/R[-16]C[-8]),"""",R[-16]C*RC[-2]/R[-16]C[-8])"
Range("K22").FormulaR1C1 = _
"=IF(ISERROR(R[-17]C*RC[-2]/R[-17]C[-8]),"""",R[-17]C*RC[-2]/R[-17]C[-8])"
Range("K23").FormulaR1C1 = _
"=IF(ISERROR(R[-18]C*RC[-2]/R[-18]C[-8]),"""",R[-18]C*RC[-2]/R[-18]C[-8])"
Range("K24").FormulaR1C1 = _
"=IF(ISERROR(R[-19]C*RC[-2]/R[-19]C[-8]),"""",R[-19]C*RC[-2]/R[-19]C[-8])"
Range("K25").FormulaR1C1 = _
"=IF(ISERROR(RC[-8]*R[-20]C/R[-20]C[-8]),"""",RC[-8]*R[-20]C/R[-20]C[-8])"
Range("K28").FormulaR1C1 = _
"=IF(ISERROR(RC[-3]*R[-23]C[-8]/RC[-6]),"""",RC[-3]*R[-23]C[-8]/RC[-6])"
Range("L3").FormulaR1C1 = "Value21"
Range("L4").FormulaR1C1 = "Value28"
Range("L5").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[-1]),"""",RC[-1]/RC[-1])"
Range("L6").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-1]C[-1]),"""",RC[-1]/R[-1]C[-1])"
Range("L7").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-2]C[-1]),"""",RC[-1]/R[-2]C[-1])"
Range("L8").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-3]C[-1]),"""",RC[-1]/R[-3]C[-1])"
Range("L9").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-4]C[-1]),"""",RC[-1]/R[-4]C[-1])"
Range("L10").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-5]C[-1]),"""",RC[-1]/R[-5]C[-1])"
Range("L11").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-6]C[-1]),"""",RC[-1]/R[-6]C[-1])"
Range("L12").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-7]C[-1]),"""",RC[-1]/R[-7]C[-1])"
Range("L13").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-8]C[-1]),"""",RC[-1]/R[-8]C[-1])"
Range("L14").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-9]C[-1]),"""",RC[-1]/R[-9]C[-1])"
Range("L15").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-10]C[-1]),"""",RC[-1]/R[-10]C[-1])"
Range("L16").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-11]C[-1]),"""",RC[-1]/R[-11]C[-1])"
Range("L17").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-12]C[-1]),"""",RC[-1]/R[-12]C[-1])"
Range("L18").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-13]C[-1]),"""",RC[-1]/R[-13]C[-1])"
Range("L19").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-14]C[-1]),"""",RC[-1]/R[-14]C[-1])"
Range("L20").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-15]C[-1]),"""",RC[-1]/R[-15]C[-1])"
Range("L21").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-16]C[-1]),"""",RC[-1]/R[-16]C[-1])"
Range("L22").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-17]C[-1]),"""",RC[-1]/R[-17]C[-1])"
Range("L23").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-18]C[-1]),"""",RC[-1]/R[-18]C[-1])"
Range("L24").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-19]C[-1]),"""",RC[-1]/R[-19]C[-1])"
Range("M3").FormulaR1C1 = "Value22"
Range("M4").FormulaR1C1 = "Value23"
Range("M25").FormulaR1C1 = "Value24"
Range("M28").FormulaR1C1 = "Value25"
Range("N3").FormulaR1C1 = "Value26"
Range("N4").FormulaR1C1 = "Value27"
Range("N5").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N6").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N7").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N8").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N9").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N10").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N11").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N12").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N13").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N14").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N15").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N16").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N17").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N18").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N19").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N20").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N21").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N22").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N23").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N24").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N25").FormulaR1C1 = _
"=IF(ISERROR(SUM(R[-20]C:R[-1]C)),"""",SUM(R[-20]C:R[-1]C))"
Range("N28").FormulaR1C1 = _
"=IF(ISERROR(R[-3]C[-11]/R[-23]C[-11]),"""",R[-3]C[-11]/R[-23]C[-11])"
Range("A3,A4,A27,B1,B3,B25,B28,C1,C3,C4,C25,C28,D3,D4,D25,D28,E4,F4,F28,G3,G4,H4,I3,I4,I28,J4,K3,K4,L3,L4,M3,M4,N3,N4,N25,M28,M25,N28,K25,K28").Select
Selection.Font.Bold = False
Selection.Font.Bold = True
Range("D3:D24,E4:E24,F4:F24,H4:H24,J4:J24,L3:L24,D28,E28,F28,H28").Select
Selection.Font.ColorIndex = 3
Range("D25").Select
Selection.Font.ColorIndex = 5
Range("A1:B1").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("C1:N1").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("A3:A4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("B3:B4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("D3:D4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("D3:F3").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("G3:H3").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("I3:J3").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("K3:K4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("L3:L4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("M3:M4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("N3:N4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("C3:C4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("A3:N4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("A5:A24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("C5:C24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("E5:E24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("G5:G24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("I5:I24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("K5:K24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("M5:M24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("N5:N24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("A25:N28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("A28:B28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("D28:E28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("F28:H28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("I28:K28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("M28:N28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("A25:B25").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("C25").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("D25:L25").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("M25:N25").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("C28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("L28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("A1:N28").Select
With Selection.Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
Range("F4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("G4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("I4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("A1:B1").Select
Range("B1").Activate
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("A1").Select
End Sub
Dear all,
i have prepared code by following excel steps.
it is too lengthy (it must require shortning), i don't know how to prepare code for border.
in the code, one part is text & formulas and other part is to bordering it.
Problem with the code are;
1) the code is starting from Range("A1").
i want it should run it on any cell of the sheet.
2) the value is also set for sr. no 1 to 20.
i want it should ask me like "how many items in table?"
3) the same code runs only one time in sheet.
i want it should runs for n times, means it should ask me like "how many tables?"
thanks in advance.
following is the code:
Sub Evaluation()
'
Columns("A:A").ColumnWidth = 3.86
Columns("B:B").ColumnWidth = 23.14
Columns("C:C").ColumnWidth = 9.29
Columns("D:D").ColumnWidth = 7.71
Columns("E:E").ColumnWidth = 6.29
Columns("F:F").ColumnWidth = 7
Columns("G:G").ColumnWidth = 9.14
Columns("H:H").ColumnWidth = 7.43
Columns("I:I").ColumnWidth = 13.43
Columns("J:J").ColumnWidth = 7
Columns("K:K").ColumnWidth = 11.86
Columns("L:L").ColumnWidth = 5.86
Columns("M:M").ColumnWidth = 9.43
Columns("N:N").ColumnWidth = 8.57
Range("A3").FormulaR1C1 = "Sr"
Range("A4").FormulaR1C1 = "No"
Range("A5").FormulaR1C1 = "1"
Range("A6").FormulaR1C1 = "2"
Range("A7").FormulaR1C1 = "3"
Range("A8").FormulaR1C1 = "4"
Range("A9").FormulaR1C1 = "5"
Range("A10").FormulaR1C1 = "6"
Range("A11").FormulaR1C1 = "7"
Range("A12").FormulaR1C1 = "8"
Range("A13").FormulaR1C1 = "9"
Range("A14").FormulaR1C1 = "10"
Range("A15").FormulaR1C1 = "11"
Range("A16").FormulaR1C1 = "12"
Range("A17").FormulaR1C1 = "13"
Range("A18").FormulaR1C1 = "14"
Range("A19").FormulaR1C1 = "15"
Range("A20").FormulaR1C1 = "16"
Range("A21").FormulaR1C1 = "17"
Range("A22").FormulaR1C1 = "18"
Range("A23").FormulaR1C1 = "19"
Range("A24").FormulaR1C1 = "20"
Range("A27").FormulaR1C1 = "Calculations :"
Range("B1").FormulaR1C1 = "Value1 "
Range("B3").FormulaR1C1 = "Name"
Range("B25").FormulaR1C1 = "Value2 : "
Range("B28").FormulaR1C1 = "Value3"
Range("C3").FormulaR1C1 = "Value4"
Range("C4").FormulaR1C1 = "Value5"
Range("C28").FormulaR1C1 = "=IF(ISERROR(R[-3]C/RC[8]*100),"""",R[-3]C/RC[8]*100)"
Range("D3").FormulaR1C1 = "Value6 "
Range("D4").FormulaR1C1 = "Value7"
Range("D5").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D6").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D7").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D8").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D9").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D10").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D11").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D12").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D13").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D14").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D15").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D16").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D17").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D18").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D19").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D20").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D21").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D22").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D23").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D24").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[1]),"""",RC[-1]/RC[1])"
Range("D25").FormulaR1C1 = _
"For Print, hide red text columns (D,E, F, H, J & L) and empty rows"
Range("D28").FormulaR1C1 = "Value8"
Range("E4").FormulaR1C1 = "Value9"
Range("F4").FormulaR1C1 = "Value10"
Range("F28").FormulaR1C1 = "Value11"
Range("G3").FormulaR1C1 = "Value12"
Range("G4").FormulaR1C1 = "Value13"
Range("G5").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G6").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G7").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G8").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G9").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G10").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G11").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G12").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G13").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G14").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G15").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G16").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G17").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G18").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G19").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G20").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G21").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G22").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G23").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("G24").FormulaR1C1 = "=IF(ISERROR(RC[-2]*RC[1]),"""",RC[-2]*RC[1])"
Range("H4").FormulaR1C1 = "Value14"
Range("H5").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H6").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H7").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H8").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H9").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H10").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H11").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H12").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H13").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H14").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H15").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H16").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H17").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H18").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H19").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H20").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H21").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H22").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H23").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("H24").FormulaR1C1 = _
"=IF(ISERROR(RC[-2]*RC[-4]/100),"""",RC[-2]*RC[-4]/100)"
Range("I3").FormulaR1C1 = "Value15"
Range("I4").FormulaR1C1 = "Value16"
Range("I5").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I6").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I7").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I8").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I9").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I10").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I11").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I12").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I13").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I14").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I15").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I16").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I17").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I18").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I19").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I20").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I21").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I22").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I23").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I24").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("I28").FormulaR1C1 = "Value17"
Range("J4").FormulaR1C1 = "Value18"
Range("J5").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J6").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J7").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J8").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J9").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J10").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J11").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J12").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J13").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J14").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J15").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J16").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J17").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J18").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J19").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J20").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J21").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J22").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J23").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("J24").FormulaR1C1 = "=IF(ISERROR(RC[-6]-RC[-2]),"""",RC[-6]-RC[-2])"
Range("K3").FormulaR1C1 = "Value19"
Range("K4").FormulaR1C1 = "Value20"
Range("K5").FormulaR1C1 = _
"=IF(ISERROR(RC[-8]/R[20]C[-8]),"""",RC[-8]/R[20]C[-8])"
Range("K6").FormulaR1C1 = _
"=IF(ISERROR(R[-1]C*RC[-2]/R[-1]C[-8]),"""",R[-1]C*RC[-2]/R[-1]C[-8])"
Range("K7").FormulaR1C1 = _
"=IF(ISERROR(R[-2]C*RC[-2]/R[-2]C[-8]),"""",R[-2]C*RC[-2]/R[-2]C[-8])"
Range("K8").FormulaR1C1 = _
"=IF(ISERROR(R[-3]C*RC[-2]/R[-3]C[-8]),"""",R[-3]C*RC[-2]/R[-3]C[-8])"
Range("K9").FormulaR1C1 = _
"=IF(ISERROR(R[-4]C*RC[-2]/R[-4]C[-8]),"""",R[-4]C*RC[-2]/R[-4]C[-8])"
Range("K10").FormulaR1C1 = _
"=IF(ISERROR(R[-5]C*RC[-2]/R[-5]C[-8]),"""",R[-5]C*RC[-2]/R[-5]C[-8])"
Range("K11").FormulaR1C1 = _
"=IF(ISERROR(R[-6]C*RC[-2]/R[-6]C[-8]),"""",R[-6]C*RC[-2]/R[-6]C[-8])"
Range("K12").FormulaR1C1 = _
"=IF(ISERROR(R[-7]C*RC[-2]/R[-7]C[-8]),"""",R[-7]C*RC[-2]/R[-7]C[-8])"
Range("K13").FormulaR1C1 = _
"=IF(ISERROR(R[-8]C*RC[-2]/R[-8]C[-8]),"""",R[-8]C*RC[-2]/R[-8]C[-8])"
Range("K14").FormulaR1C1 = _
"=IF(ISERROR(R[-9]C*RC[-2]/R[-9]C[-8]),"""",R[-9]C*RC[-2]/R[-9]C[-8])"
Range("K15").FormulaR1C1 = _
"=IF(ISERROR(R[-10]C*RC[-2]/R[-10]C[-8]),"""",R[-10]C*RC[-2]/R[-10]C[-8])"
Range("K16").FormulaR1C1 = _
"=IF(ISERROR(R[-11]C*RC[-2]/R[-11]C[-8]),"""",R[-11]C*RC[-2]/R[-11]C[-8])"
Range("K17").FormulaR1C1 = _
"=IF(ISERROR(R[-12]C*RC[-2]/R[-12]C[-8]),"""",R[-12]C*RC[-2]/R[-12]C[-8])"
Range("K18").FormulaR1C1 = _
"=IF(ISERROR(R[-13]C*RC[-2]/R[-13]C[-8]),"""",R[-13]C*RC[-2]/R[-13]C[-8])"
Range("K19").FormulaR1C1 = _
"=IF(ISERROR(R[-14]C*RC[-2]/R[-14]C[-8]),"""",R[-14]C*RC[-2]/R[-14]C[-8])"
Range("K20").FormulaR1C1 = _
"=IF(ISERROR(R[-15]C*RC[-2]/R[-15]C[-8]),"""",R[-15]C*RC[-2]/R[-15]C[-8])"
Range("K21").FormulaR1C1 = _
"=IF(ISERROR(R[-16]C*RC[-2]/R[-16]C[-8]),"""",R[-16]C*RC[-2]/R[-16]C[-8])"
Range("K22").FormulaR1C1 = _
"=IF(ISERROR(R[-17]C*RC[-2]/R[-17]C[-8]),"""",R[-17]C*RC[-2]/R[-17]C[-8])"
Range("K23").FormulaR1C1 = _
"=IF(ISERROR(R[-18]C*RC[-2]/R[-18]C[-8]),"""",R[-18]C*RC[-2]/R[-18]C[-8])"
Range("K24").FormulaR1C1 = _
"=IF(ISERROR(R[-19]C*RC[-2]/R[-19]C[-8]),"""",R[-19]C*RC[-2]/R[-19]C[-8])"
Range("K25").FormulaR1C1 = _
"=IF(ISERROR(RC[-8]*R[-20]C/R[-20]C[-8]),"""",RC[-8]*R[-20]C/R[-20]C[-8])"
Range("K28").FormulaR1C1 = _
"=IF(ISERROR(RC[-3]*R[-23]C[-8]/RC[-6]),"""",RC[-3]*R[-23]C[-8]/RC[-6])"
Range("L3").FormulaR1C1 = "Value21"
Range("L4").FormulaR1C1 = "Value28"
Range("L5").FormulaR1C1 = "=IF(ISERROR(RC[-1]/RC[-1]),"""",RC[-1]/RC[-1])"
Range("L6").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-1]C[-1]),"""",RC[-1]/R[-1]C[-1])"
Range("L7").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-2]C[-1]),"""",RC[-1]/R[-2]C[-1])"
Range("L8").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-3]C[-1]),"""",RC[-1]/R[-3]C[-1])"
Range("L9").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-4]C[-1]),"""",RC[-1]/R[-4]C[-1])"
Range("L10").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-5]C[-1]),"""",RC[-1]/R[-5]C[-1])"
Range("L11").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-6]C[-1]),"""",RC[-1]/R[-6]C[-1])"
Range("L12").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-7]C[-1]),"""",RC[-1]/R[-7]C[-1])"
Range("L13").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-8]C[-1]),"""",RC[-1]/R[-8]C[-1])"
Range("L14").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-9]C[-1]),"""",RC[-1]/R[-9]C[-1])"
Range("L15").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-10]C[-1]),"""",RC[-1]/R[-10]C[-1])"
Range("L16").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-11]C[-1]),"""",RC[-1]/R[-11]C[-1])"
Range("L17").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-12]C[-1]),"""",RC[-1]/R[-12]C[-1])"
Range("L18").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-13]C[-1]),"""",RC[-1]/R[-13]C[-1])"
Range("L19").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-14]C[-1]),"""",RC[-1]/R[-14]C[-1])"
Range("L20").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-15]C[-1]),"""",RC[-1]/R[-15]C[-1])"
Range("L21").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-16]C[-1]),"""",RC[-1]/R[-16]C[-1])"
Range("L22").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-17]C[-1]),"""",RC[-1]/R[-17]C[-1])"
Range("L23").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-18]C[-1]),"""",RC[-1]/R[-18]C[-1])"
Range("L24").FormulaR1C1 = _
"=IF(ISERROR(RC[-1]/R[-19]C[-1]),"""",RC[-1]/R[-19]C[-1])"
Range("M3").FormulaR1C1 = "Value22"
Range("M4").FormulaR1C1 = "Value23"
Range("M25").FormulaR1C1 = "Value24"
Range("M28").FormulaR1C1 = "Value25"
Range("N3").FormulaR1C1 = "Value26"
Range("N4").FormulaR1C1 = "Value27"
Range("N5").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N6").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N7").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N8").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N9").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N10").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N11").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N12").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N13").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N14").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N15").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N16").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N17").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N18").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N19").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N20").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N21").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N22").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N23").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N24").FormulaR1C1 = "=IF(ISERROR(RC[-1]*RC[-3]),"""",RC[-1]*RC[-3])"
Range("N25").FormulaR1C1 = _
"=IF(ISERROR(SUM(R[-20]C:R[-1]C)),"""",SUM(R[-20]C:R[-1]C))"
Range("N28").FormulaR1C1 = _
"=IF(ISERROR(R[-3]C[-11]/R[-23]C[-11]),"""",R[-3]C[-11]/R[-23]C[-11])"
Range("A3,A4,A27,B1,B3,B25,B28,C1,C3,C4,C25,C28,D3,D4,D25,D28,E4,F4,F28,G3,G4,H4,I3,I4,I28,J4,K3,K4,L3,L4,M3,M4,N3,N4,N25,M28,M25,N28,K25,K28").Select
Selection.Font.Bold = False
Selection.Font.Bold = True
Range("D3:D24,E4:E24,F4:F24,H4:H24,J4:J24,L3:L24,D28,E28,F28,H28").Select
Selection.Font.ColorIndex = 3
Range("D25").Select
Selection.Font.ColorIndex = 5
Range("A1:B1").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("C1:N1").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("A3:A4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("B3:B4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("D3:D4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("D3:F3").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("G3:H3").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("I3:J3").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("K3:K4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("L3:L4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("M3:M4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("N3:N4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("C3:C4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("A3:N4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("A5:A24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("C5:C24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("E5:E24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("G5:G24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("I5:I24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("K5:K24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("M5:M24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("N5:N24").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("A25:N28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range("A28:B28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("D28:E28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("F28:H28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("I28:K28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("M28:N28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("A25:B25").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("C25").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("D25:L25").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("M25:N25").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("C28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("L28").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("A1:N28").Select
With Selection.Interior
.ColorIndex = 2
.Pattern = xlSolid
End With
Range("F4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("G4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("I4").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Range("A1:B1").Select
Range("B1").Activate
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Range("A1").Select
End Sub