Código VBA
Código VBA
78
Range("D11").Select
ActiveCell.FormulaR1C1 = "=+(25.4/1000)*R[-1]C"
Range(Celda).Select
'Iteraciones_Hojas.Calcular_I
End If
'If Not Intersect(Target, Range("D8:D9")) Is Nothing Then Iteraciones_Hojas.Calcular_I
'If Not Intersect(Target, Range("D13:D15")) Is Nothing Then Iteraciones_Hojas.Calcular_I
End Sub
Hoja 2 (Diámetro)
79
Hoja 3(UnaTuberia)
80
Range("D11").Select
ActiveCell.FormulaR1C1 = "=+(25.4/1000)*R[-1]C"
Range(Celda).Select
Iteraciones_Hojas.Calcular_III
End If
If Not Intersect(Target, Range("D8:D9")) Is Nothing Then Iteraciones_Hojas.Calcular_III
If Not Intersect(Target, Range("D13:D15")) Is Nothing Then Iteraciones_Hojas.Calcular_III
End Sub
Hoja 4(TuberiaSerie)
81
If Not Intersect(Target, Range("H12:H100")) Is Nothing Then Iteraciones_Hojas.Calcular_IV
End Sub
Hoja 5(TuberiaParalelo)
82
End Sub
Hoja 6(Desarenador)
83
"IF(R[-22]C=R[-32]C[7],2," & _
"IF(R[-22]C=R[-32]C[8],3," & _
"IF(R[-22]C=R[-32]C[9],4," & _
"IF(R[-22]C=R[-32]C[10],5," & _
"IF(R[-22]C=R[-32]C[11],6," & _
"IF(R[-22]C=R[-32]C[12],7," & _
"IF(R[-22]C=R[-32]C[13],8," & _
"IF(R[-22]C=R[-32]C[14],9)))))))),FALSE)"
Range(Celda).Select
End If
84
If Not Intersect(Target, Range("E15:E19")) Is Nothing Then
Celda = ActiveCell.Address
Range("E41").Select
ActiveCell.FormulaR1C1 = _
"=+VLOOKUP(R[-23]C,R10C11:R12C19," & _
"IF(R[-22]C=R[-32]C[7],2," & _
"IF(R[-22]C=R[-32]C[8],3," & _
"IF(R[-22]C=R[-32]C[9],4," & _
"IF(R[-22]C=R[-32]C[10],5," & _
"IF(R[-22]C=R[-32]C[11],6," & _
"IF(R[-22]C=R[-32]C[12],7," & _
"IF(R[-22]C=R[-32]C[13],8," & _
"IF(R[-22]C=R[-32]C[14],9)))))))),FALSE)"
Range(Celda).Select
End If
If Target.Address(False, False) = "E20" Then
Celda = ActiveCell.Address
Range("E21").Select
ActiveCell.FormulaR1C1 = "=10000*Visc_Cinematica(R[-1]C)"
Range("E41").Select
ActiveCell.FormulaR1C1 = _
"=+VLOOKUP(R[-23]C,R10C11:R12C19," & _
"IF(R[-22]C=R[-32]C[7],2," & _
"IF(R[-22]C=R[-32]C[8],3," & _
"IF(R[-22]C=R[-32]C[9],4," & _
"IF(R[-22]C=R[-32]C[10],5," & _
"IF(R[-22]C=R[-32]C[11],6," & _
85
"IF(R[-22]C=R[-32]C[12],7," & _
"IF(R[-22]C=R[-32]C[13],8," & _
"IF(R[-22]C=R[-32]C[14],9)))))))),FALSE)"
Range(Celda).Select
End If
If Target.Address(False, False) = "E23" Then
Celda = ActiveCell.Address
Range("E35").Select
ActiveCell.FormulaR1C1 = "=IF(R[-12]C=""SI"",0.02,0.01)"
Range("E41").Select
ActiveCell.FormulaR1C1 = _
"=+VLOOKUP(R[-23]C,R10C11:R12C19," & _
"IF(R[-22]C=R[-32]C[7],2," & _
"IF(R[-22]C=R[-32]C[8],3," & _
"IF(R[-22]C=R[-32]C[9],4," & _
"IF(R[-22]C=R[-32]C[10],5," & _
"IF(R[-22]C=R[-32]C[11],6," & _
"IF(R[-22]C=R[-32]C[12],7," & _
"IF(R[-22]C=R[-32]C[13],8," & _
"IF(R[-22]C=R[-32]C[14],9)))))))),FALSE)"
Range(Celda).Select
End If
If Not Intersect(Target, Range("H27:H28")) Is Nothing Then
Celda = ActiveCell.Address
Range("E41").Select
ActiveCell.FormulaR1C1 = _
"=+VLOOKUP(R[-23]C,R10C11:R12C19," & _
86
"IF(R[-22]C=R[-32]C[7],2," & _
"IF(R[-22]C=R[-32]C[8],3," & _
"IF(R[-22]C=R[-32]C[9],4," & _
"IF(R[-22]C=R[-32]C[10],5," & _
"IF(R[-22]C=R[-32]C[11],6," & _
"IF(R[-22]C=R[-32]C[12],7," & _
"IF(R[-22]C=R[-32]C[13],8," & _
"IF(R[-22]C=R[-32]C[14],9)))))))),FALSE)"
Range(Celda).Select
End If
End Sub
Hoja 7(Alcantarillados)
87
Celda = ActiveCell.Address
Range("E13").Select
ActiveCell.FormulaR1C1 = "=+SQRT((R[-2]C-R[-1]C) ^2+(R[-2]C[1]-R[-1]C[1])^2)"
Range("E23").Select
ActiveCell.FormulaR1C1 = "=+ABS(R[-16]C[1])/R[-10]C"
Range(Celda).Select
End If
If Target.Address(False, False) = "E15" Then
Celda = ActiveCell.Address
Range("E16").Select
ActiveCell.FormulaR1C1 = "=+Visc_Cinematica(R[-1]C)"
Range("E23").Select
ActiveCell.FormulaR1C1 = "=+ABS(R[-16]C[1])/R[-10]C"
Range(Celda).Select
End If
If Target.Address(False, False) = "F7" Then
Celda = ActiveCell.Address
Range("E23").Select
ActiveCell.FormulaR1C1 = "=+ABS(R[-16]C[1])/R[-10]C"
Range(Celda).Select
End If
If Target.Address(False, False) = "E13" Then
Celda = ActiveCell.Address
Range("E23").Select
ActiveCell.FormulaR1C1 = "=+ABS(R[-16]C[1])/R[-10]C"
Range(Celda).Select
End If
88
End Sub
ThisWorkbook
89
End With
Dim Current As Worksheet
For Each Current In Worksheets
If Current.Name = "Hoja1" Then Exit For
'MsgBox Current.Name
Current.visible = False
Next
'For Each img In ActiveSheet.Shapes
' ActiveSheet.Shapes.Range(Array(1)).Select
' Selection.Delete
'Next img
Range("A1").Select
Presentacion.Show
End Sub
90
Formularios (Presentación)
91
Private Sub UserForm_Activate()
Application.OnTime Now + TimeValue("00:00:07"), "KillTheForm"
End Sub
Módulos (basCallbacks)
' Globals
92
' More information in Callback "getVisible
' Für Callback "getVisible"
' Further informations in Callback "getVisible
93
Select Case control.id
Case "btn1"
Sheets("Cabeza").visible = True
Sheets("Cabeza").Select
Case "btn2"
Sheets("Diametro").visible = True
Sheets("Diametro").Select
Case "btn3"
Sheets("UnaTuberia").visible = True
Sheets("UnaTuberia").Select
Case "btn4"
Sheets("TuberiaSerie").visible = True
Sheets("TuberiaSerie").Select
Case "btn5"
Sheets("TuberiaParalelo").visible = True
Sheets("TuberiaParalelo").Select
Case "btn6"
Sheets("Desarenador").visible = True
Sheets("Desarenador").Select
Formulas_I.Iterar_VI
Case "btn7"
Sheets("Alcantarillados").visible = True
Sheets("Alcantarillados").Select
Case Else
MsgBox "Button """ & control.id & """ clicked" & vbCrLf & _
"Es wurde auf Button """ & control.id & """ in Ribbon geklickt", _
vbInformation
94
End Select
End Sub
'Command Button
End Sub
95
' If pressed = True Then
'
' Else
'
' End If
'
Case Else
MsgBox "The Value of the Checkbox """ & control.id & """ is: " & pressed & vbCrLf & _
"Der Wert der Checkbox """ & control.id & """ ist: " & pressed, _
vbInformation
End Select
End Sub
Sub GetPressedCheckBox(control As IRibbonControl, _
ByRef bolReturn)
96
bolReturn = True
Else
bolReturn = False
End If
End Select
End Sub
97
End Select
End Sub
' Callback für ein Access ToogleButton Control wie dieser Angezeigt werden soll
' Callback for an Access ToogleButton Control. Indicates how the control is displayed
98
' Weitere Informationen: http://www.accessribbon.de/index.php?Downloads:12
99
' Callbackname in XML File "getLabel"
' To set the property "label" to a Ribbon Control
End Select
End Sub
'EditBox
100
strText = getTheValue(control.Tag, "DefaultValue")
End Select
End Sub
End Sub
'DropDown
101
Sub OnActionDropDown(control As IRibbonControl, _
selectedId As String, _
selectedIndex As Integer)
' Callbackname in XML File "OnActionDropDown"
End Sub
102
If IsNumeric(varIndex) Then
Select Case control.id
Case Else
index = varIndex
End Select
End If
End Sub
'Gallery
103
MsgBox "The selected ItemID of Gallery-Control """ & control.id & """ is : """ & selectedId & """" & vbCrLf
&_
"Die selektierte ItemID des Gallery-Control """ & control.id & """ ist : """ & selectedId & """", _
vbInformation
End Select
End Select
End Sub
If IsNumeric(varIndex) Then
Select Case control.id
Case Else
index = varIndex
End Select
End If
104
End Sub
'Combobox
End Sub
105
Select Case control.id
Case Else
MsgBox "The selected Item of Combobox-Control """ & control.id & """ is : """ & strText & """" & vbCrLf & _
"Das selektierte Item des Combobox-Control """ & control.id & """ ist : """ & strText & """", _
vbInformation
End Select
End Sub
' DynamicMenu
Sub GetContent(control As IRibbonControl, _
ByRef XMLString)
106
Case Else
XMLString = getXMLForDynamicMenu()
End Select
End Sub
107
Items(2).id = "btnDy3"
Items(2).label = "Item 3"
Items(2).imageMso = "_3"
Items(3).id = "btnDy4"
Items(3).label = "Item 4"
Items(3).imageMso = "_4"
Items(4).id = "btnDy5"
Items(4).label = "Item 5"
Items(4).imageMso = "_5"
End Function
108
' *************************************************************
' Erstellt von : Avenius
' Parameter : Input String, SuchValue String
' Erstellungsdatum : 05.01.2008
' Bemerkungen :
' Änderungen :
'
' Beispiel
' getTheValue("DefaultValue:=Test;Enabled:=0;Visible:=1", "DefaultValue")
' Return : "Test"
' *************************************************************
109
End If
Next
End Function
'################################################################
'# #
'# Created with / Erstellt mit: #
'# IDBE Ribbon Creator #
'# Version 1.1034 #
'# #
'# (c) 2009-2010 IDBE Avenius #
'# #
'# http://www.ribboncreator.com #
'# http://www.ribboncreator2010.com #
'# http://www.accessribon.com #
'# http://www.avenius.com #
'# #
'# You may send change requests or report errors to: #
'# Aenderungswuensche oder Fehler bitte an: #
'# #
110
'# mailto://[email protected] #
'# #
'################################################################
Módulos (Formatos_Especiales)
111
ActiveWindow.Zoom = 90
Cells.Select
With Selection
.ClearContents
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.Name = "Arial"
.FontStyle = "Normal"
.Size = 10
.Strikethrough = False
.Subscript = False
.OutlineFont = False
112
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
End With
Range("A1").Select
End Sub
113
Cells.EntireColumn.AutoFit
Cells.EntireRow.AutoFit
'Columns("B:E").Select
'Selection.ColumnWidth = A
Range("A1").Select
End Sub
Sub Formato_Celda()
Selection.Borders(xlEdgeLeft).ColorIndex = xlAutomatic
Selection.Borders(xlEdgeTop).LineStyle = xlContinuous
Selection.Borders(xlEdgeBottom).LineStyle = xlContinuous
Selection.Borders(xlEdgeRight).LineStyle = xlContinuous
Selection.NumberFormat = "0"
Selection.Interior.ThemeColor = xlThemeColorDark1
Selection.Interior.TintAndShade = -0.05
Selection.Font.Bold = True
Selection.Font.Italic = True
End Sub
114
Módulos (Formulas_I)
115
End Function
116
Public Function Hk(k, d, Q As Variant, Optional g As Variant = 9.81) As Variant
Application.Volatile True
Pi = 4 * Atn(1)
Pi2 = Pi ^ 2
Hk = (k / (d ^ 4)) * ((8 * Q * Abs(Q)) / (Pi2 * g))
End Function
117
Public Function QV(f, L, k, d, H As Variant, Optional g As Variant = 9.81) As Variant
Application.Volatile True
Pi = 4 * Atn(1)
v = Sqr((2 * g * H * d) / (f * L + k * d))
Q = (Pi / 4) * (d ^ 2) * v
QV = Array(Q, v)
End Function
118
End Function
119
Application.Volatile True
Pi = 4 * Atn(1)
d_Stokes = ((18 * Vs * visc) / (g * (rs - r))) ^ (1 / 2)
End Function
120
Sub Iterar_VI()
With Application
.Iteration = True
.MaxIterations = 1000
.MaxChange = 0.000000001
End With
'Range("E8").Select
'ActiveCell.FormulaR1C1 = "=+2*((3*R[42]C)^(1/3))"
Range("E9").Select
ActiveCell.FormulaR1C1 = "=+ROUND(L/4/5,2)*5"
Range("E10").Select
ActiveCell.FormulaR1C1 = "=+ROUND(B/1.5/5,2)*5"
'Range("H28").Select
'ActiveCell.FormulaR1C1 = "=+R[1]C"
'Range("H29").Select
'ActiveCell.FormulaR1C1 = "=+MIN(R[4]C[-3],R[15]C[-3])"
End Sub
121
Application.Volatile True
Pi = 4 * Atn(1)
Dx = Pi / 648000
fp = (Funcion(x + Dx, Q, n, S, d0) - Funcion(x, Q, n, S, d0)) / Dx
FuncionD = fp
End Function
122
End Function
Módulos (Formulas_Viscosidad_Cinematica)
y = Array(1.787, 1.519, 1.307, 1.004, 0.801, 0.658, 0.553, 0.475, 0.413, 0.365, 0.326, 0.294)
x = Array( _
Array(0 ^ 1, 5 ^ 1, 10 ^ 1, 20 ^ 1, 30 ^ 1, 40 ^ 1, 50 ^ 1, 60 ^ 1, 70 ^ 1, 80 ^ 1, 90 ^ 1, 100 ^ 1), _
Array(0 ^ 2, 5 ^ 2, 10 ^ 2, 20 ^ 2, 30 ^ 2, 40 ^ 2, 50 ^ 2, 60 ^ 2, 70 ^ 2, 80 ^ 2, 90 ^ 2, 100 ^ 2), _
Array(0 ^ 3, 5 ^ 3, 10 ^ 3, 20 ^ 3, 30 ^ 3, 40 ^ 3, 50 ^ 3, 60 ^ 3, 70 ^ 3, 80 ^ 3, 90 ^ 3, 100 ^ 3), _
123
Array(0 ^ 4, 5 ^ 4, 10 ^ 4, 20 ^ 4, 30 ^ 4, 40 ^ 4, 50 ^ 4, 60 ^ 4, 70 ^ 4, 80 ^ 4, 90 ^ 4, 100 ^ 4), _
Array(0 ^ 5, 5 ^ 5, 10 ^ 5, 20 ^ 5, 30 ^ 5, 40 ^ 5, 50 ^ 5, 60 ^ 5, 70 ^ 5, 80 ^ 5, 90 ^ 5, 100 ^ 5), _
Array(0 ^ 6, 5 ^ 6, 10 ^ 6, 20 ^ 6, 30 ^ 6, 40 ^ 6, 50 ^ 6, 60 ^ 6, 70 ^ 6, 80 ^ 6, 90 ^ 6, 100 ^ 6), _
Array(0 ^ 7, 5 ^ 7, 10 ^ 7, 20 ^ 7, 30 ^ 7, 40 ^ 7, 50 ^ 7, 60 ^ 7, 70 ^ 7, 80 ^ 7, 90 ^ 7, 100 ^ 7), _
Array(0 ^ 8, 5 ^ 8, 10 ^ 8, 20 ^ 8, 30 ^ 8, 40 ^ 8, 50 ^ 8, 60 ^ 8, 70 ^ 8, 80 ^ 8, 90 ^ 8, 100 ^ 8), _
Array(0 ^ 9, 5 ^ 9, 10 ^ 9, 20 ^ 9, 30 ^ 9, 40 ^ 9, 50 ^ 9, 60 ^ 9, 70 ^ 9, 80 ^ 9, 90 ^ 9, 100 ^ 9), _
Array(0 ^ 10, 5 ^ 10, 10 ^ 10, 20 ^ 10, 30 ^ 10, 40 ^ 10, 50 ^ 10, 60 ^ 10, 70 ^ 10, 80 ^ 10, 90 ^ 10, 100 ^ 10), _
Array(0 ^ 11, 5 ^ 11, 10 ^ 11, 20 ^ 11, 30 ^ 11, 40 ^ 11, 50 ^ 11, 60 ^ 11, 70 ^ 11, 80 ^ 11, 90 ^ 11, 100 ^ 11))
xn = Array( _
Array(Temperatura ^ 11), _
Array(Temperatura ^ 10), _
Array(Temperatura ^ 9), _
Array(Temperatura ^ 8), _
Array(Temperatura ^ 7), _
Array(Temperatura ^ 6), _
Array(Temperatura ^ 5), _
Array(Temperatura ^ 4), _
Array(Temperatura ^ 3), _
Array(Temperatura ^ 2), _
Array(Temperatura ^ 1), _
Array(Temperatura ^ 0))
Exponentes = WorksheetFunction.LinEst(y, x)
124
End Function
Módulos (Iteraciones_Hojas)
With Application
.Iteration = True
.MaxIterations = 1000
.MaxChange = 0.000000001
End With
125
Range("D17").Select
ActiveCell.FormulaR1C1 = "=+(25.4/1000)*R[-3]C"
Range("D17").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D18").Select
ActiveCell.FormulaR1C1 = "=+R[-1]C[4]"
Range("D18").Select
ActiveCell.FormulaR1C1 = "=+RC[4]"
Range("D17").Select
ActiveCell.FormulaR1C1 = "=+R[1]C[4]"
Range("D17").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D18").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=+R[-1]C[4]"
Range(Celda).Select
With Application
.Iteration = False
.MaxIterations = 100
.MaxChange = 0.001
End With
126
End Sub
With Application
.Iteration = True
.MaxIterations = 1000
.MaxChange = 0.000000001
End With
Range("D18").Select
ActiveCell.FormulaR1C1 = "=+Darcy(eD)"
Range("E18:F18").Select
Selection.FormulaArray = "=+QV(RC[-1],L,K,D,H)"
Range("G18").Select
ActiveCell.FormulaR1C1 = "=+NR(RC[-2],D,n)"
Range("D19:G19").Select
Selection.ClearContents
Range("D19").Select
ActiveCell.FormulaR1C1 = "=+Darcy(eD,R[-1]C[3])"
Range("E18:G18").Select
Selection.Copy
Range("E19").Select
127
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Range("D19").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=+Darcy(eD,RC[3])"
Range("D19").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With Application
.Iteration = False
.MaxIterations = 100
.MaxChange = 0.001
End With
Range(Celda).Select
End Sub
Range("N12:N100").Select
Selection.Copy
Range("H12").Select
128
For n = 0 To 100
If (Range("M13").Value = 0.00000000005) Then Exit For
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
CIteracion = n
Next n
Application.CutCopyMode = False
Range("A1").Select
ActiveCell.FormulaR1C1 = "Ireración " & CIteracion
'Range(Celda).Select
End Sub
Range("H24").Select
ActiveCell.FormulaR1C1 = "=+1/100"
Range("H25").Select
ActiveCell.FormulaR1C1 = "=+2/100"
Range("H26").Select
Range("H34").Select
ActiveCell.FormulaR1C1 = "=+1/100"
Range("H35").Select
ActiveCell.FormulaR1C1 = "=-1/100"
Range("H36").Select
129
Range("H44").Select
ActiveCell.FormulaR1C1 = "=-2/100"
Range("H45").Select
ActiveCell.FormulaR1C1 = "=-1/100"
Range("H46").Select
Range("N23:N123").Select
Selection.Copy
Range("H23").Select
For n = 0 To 100
SE = Abs(Range("M24").Value) + Abs(Range("M34").Value) + Abs(Range("M44").Value)
If (SE <= 0) Then Exit For
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
CIteracion = n
Next n
Application.CutCopyMode = False
Range("A1").Select
ActiveCell.FormulaR1C1 = "Ireración " & CIteracion
Range(Celda).Select
End Sub
'Calculo Desarenador
Sub Calcular_VI()
Celda = ActiveCell.Address
ActiveWindow.Zoom = 60
130
With Application
.Iteration = True
.MaxIterations = 1000
.MaxChange = 0.000000001
End With
Range("E8").Select
ActiveCell.FormulaR1C1 = "=2*((3*R[42]C)^(1/3))"
Range("E9").Select
ActiveCell.FormulaR1C1 = "=+ROUND(L/4/5,2)*5"
Range("E10").Select
ActiveCell.FormulaR1C1 = "=+ROUND(B/1.5/5,2)*5"
Range(Celda).Select
End Sub
Módulos (RelacionesHidraulicas)
131
End Function
132
Application.Volatile True
Pi = 4 * Atn(1)
CaudalQ = (1 / n) * AreaT(Angulo, d0) * (RadioHidraulicoT(Angulo, d0) ^ (2 / 3)) * Sqr(S)
End Function
133
End Function
Módulos (SolverI)
Sub SolverEjecutar()
With Application
.Iteration = True
.MaxIterations = 1000
.MaxChange = 0.000000001
End With
Celda = ActiveCell.Address
Range("E8").Select
134
ActiveCell.FormulaR1C1 = "=+2*((3*R[42]C)^(1/3))"
Range("E9").Select
ActiveCell.FormulaR1C1 = "=+ROUND(L/4/5,2)*5"
Range("E10").Select
ActiveCell.FormulaR1C1 = "=+ROUND(B/1.5/5,2)*5"
SolverRestablecer
135
SolverAgregar referenciaCelda:="$E$62", relación:=1, Formula:="As"
136
SolverAceptar definirCelda:="$E$25", valorMáxMín:=2, valorDe:="0", _
celdasCambiantes:="$E$8:$E$10"
SolverResolver
'SolverRestablecer
Range(Celda).Select
End Sub