Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PROGRAMA
METALTOOLS
DISEO DE PERFILES METALICOS
LAMINADOS EN FRIO
MANUAL DE USUARIO
Introduccin:
Men de opciones:
1 BOTON:
Con el cual se puede
Abrir directamente
El SAP 2000
2 BOTON:
Con el cual se puede
Cerrar directamente el
SAP2000
Paso 1:
Paso 2: recoleccin de datos del SAP 2000 una vez abierto. tiene programa
tiene que abrir el archivo donde est el tinglado.
Paso 3: ya abierto el archivo donde est el modelo del tinglado realizar los
siguientes paso.
Paso 5: debe elegir la carga de diseno para haci obtener los datos.
Paso 9: una vez obteniso la tabla de excel riene que guardar simpre con el nombre Libri Origen1
Paso 11: este archivo tiene que guardar con cual quier nombre .
Paso12: una vez ya extraido las planillas de las fuerzas ahra podemos presionar el BOTON 3:
3 BOTON:
Con el cual recolecta datos
Filtrados de la tabla de
Fuerzas Exportados del
sap2000
PASO 15: Luego debe presionar el boton de caragado de dat para haci el prgramas cargue las
planillas ya filtradas.
4 BOTON:
Con el cual carga los datos
Ya filtrados de la planilla de
Fuerzas
Paso 16: en el cual se cargan los elementos provenientes de la segunda planilla del sap extraida.
4 BOTON:
Con el cual carga los
Elementos de los perfiles
Paso 17: presionar el boton calacular en la cual el rpograms podra calcular los elementeos segn
a la fuerza que tienen cada elemente.
4 BOTON:
Con el cual calcula los
elementos
NOTA: todas las planillas a utilizar deben estar en el mismo archivo que el
programa para hace pueda reconocer.
CODIGOS DE
PRGRMACION DE
VISULA BASIC
Sub Clear()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False
Range("A18:D30000").Select
Selection.ClearContents
Range("E18:P30000").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("A18").Select
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
Application.CutCopyMode = False
MsgBox " Los datos de los elementos han sido borrados" 'mensaje de
borrado
End Sub
Sub calculate()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False
Range("E18").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]>=0,RC[-2]/(0.9*R12C3),-RC[-2]/(0.9*R12C3))"
Range("F18").Select
ActiveCell.FormulaR1C1 = _
Range("G18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-4]<0,R13C3*0.658^((R13C3/
(0.77*((PI()^2*R14C3/(RC[-3]*100/(MIN(RC[5]:RC[6])))^2))))^2),0.9*RC[-
1]*R12C3)"
Range("H18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-5]<0,0.85*RC[-1]*(1.75*RC[-
2]),0.6*R12C3*RC[-2])"
Range("I18").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-6]<0,""COMPRESIN"",""TENSIN"")"
Range("J18").Select
ActiveCell.FormulaR1C1 = _
Range("K18").Select
ActiveCell.FormulaR1C1 = _
Range("L18").Select
ActiveCell.FormulaR1C1 = "=SQRT(RC[-2]/RC[-6])"
Range("M18").Select
ActiveCell.FormulaR1C1 = "=SQRT(RC[-2]/RC[-7])"
Range("N18").Select
ActiveCell.FormulaR1C1 = "=(100*RC[-10])/MIN(RC[-2]:RC[-1])"
Range("O18").Select
ActiveCell.FormulaR1C1 = _
Range("P18").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-13]<0,IF(RC[-8]>RC[-13],""CUMPLE A COMPRESIN"",""NO
CUMPLE A COMPRESIN"")&"" ""&IF(RC[-8]>RC[-13],""CUMPLE AREA
EFECTIVA"",""NO CUMPLE AREA EFECTIVA"")&"" ""&IF(300>RC[-2],""CUMPLE LA
ESBELTEZ"",""NO CUMPLE LA ESBELTEZ""),IF(RC[-8]>RC[-13],""CUMPLE A
TENSION"",""NO CUMPLE A TENSION"")&"" ""&IF(RC[-8]>RC[-13],""CUMPLE A
ROTURA"",""NO CUMPLE A ROTURA"")&"" ""&IF(300>RC[-2],""CUMPLE LA
ESBELTEZ"",""NO CUMPLE LA ESBELTEZ""))"
Range("P18").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("E18:P18").Select
Selection.AutoFill Destination:=Range("E18:P4885")
Range("E18:P4885").Select
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
Range("P18").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.AutoFill Destination:=Range("P18:P4885")
Range("P18:P4885").Select
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("C9").Select
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
Application.CutCopyMode = False
Worksheets("Calculo").Select
End Sub
Sub calculate()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False
Range("E18").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-2]>=0,RC[-2]/(0.9*R12C3),-RC[-2]/(0.9*R12C3))"
Range("F18").Select
ActiveCell.FormulaR1C1 = _
Range("G18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-4]<0,R13C3*0.658^((R13C3/
(0.77*((PI()^2*R14C3/(RC[-3]*100/(MIN(RC[5]:RC[6])))^2))))^2),0.9*RC[-
1]*R12C3)"
Range("H18").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-5]<0,0.85*RC[-1]*(1.75*RC[-
2]),0.6*R12C3*RC[-2])"
Range("I18").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-6]<0,""COMPRESIN"",""TENSIN"")"
Range("J18").Select
ActiveCell.FormulaR1C1 = _
Range("K18").Select
ActiveCell.FormulaR1C1 = _
Range("L18").Select
ActiveCell.FormulaR1C1 = "=SQRT(RC[-2]/RC[-6])"
Range("M18").Select
ActiveCell.FormulaR1C1 = "=SQRT(RC[-2]/RC[-7])"
Range("N18").Select
ActiveCell.FormulaR1C1 = "=(100*RC[-10])/MIN(RC[-2]:RC[-1])"
Range("O18").Select
ActiveCell.FormulaR1C1 = _
Range("P18").Select
ActiveCell.FormulaR1C1 = _
"=IF(RC[-13]<0,IF(RC[-8]>RC[-13],""CUMPLE A COMPRESIN"",""NO
CUMPLE A COMPRESIN"")&"" ""&IF(RC[-8]>RC[-13],""CUMPLE AREA
EFECTIVA"",""NO CUMPLE AREA EFECTIVA"")&"" ""&IF(300>RC[-2],""CUMPLE LA
ESBELTEZ"",""NO CUMPLE LA ESBELTEZ""),IF(RC[-8]>RC[-13],""CUMPLE A
TENSION"",""NO CUMPLE A TENSION"")&"" ""&IF(RC[-8]>RC[-13],""CUMPLE A
ROTURA"",""NO CUMPLE A ROTURA"")&"" ""&IF(300>RC[-2],""CUMPLE LA
ESBELTEZ"",""NO CUMPLE LA ESBELTEZ""))"
Range("P18").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("E18:P18").Select
Selection.AutoFill Destination:=Range("E18:P4885")
Range("E18:P4885").Select
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
Range("P18").Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.AutoFill Destination:=Range("P18:P4885")
Range("P18:P4885").Select
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("C9").Select
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
Application.CutCopyMode = False
Worksheets("Calculo").Select
End Sub
Sub uno()
'
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Sheets("Destino").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-12]=R[1]C[-12],""SI"",""NO"")"
Range("M1").Select
Selection.AutoFill Destination:=Range("M1:M24608")
Range("M1:M24608").Select
Selection.AutoFilter
ActiveSheet.Range("$M$1:$M$24608").AutoFilter Field:=1,
Criteria1:="SI"
Range("M2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
ActiveSheet.Range("$M$1:$M$9763").AutoFilter Field:=1
Selection.ClearContents
Range("M1").Select
Selection.AutoFilter
ActiveCell.FormulaR1C1 = "=IF(RC[-12]=R[1]C[-12],""SI"",""NO"")"
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Calculo").Select
Range("A18").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Sheets("Destino").Select
Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Calculo").Select
Range("D18").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Sheets("Destino").Select
Range("E2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Calculo").Select
Range("C18").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
Range("A18").Select
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
Application.CutCopyMode = False
'fin
End Sub
Sub Seleccionar_elemets()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
ActiveSheet.DisplayPageBreaks = False
Application.DisplayAlerts = False
ruta = ActiveWorkbook.Path
ChDir ruta
mybook = ActiveWorkbook.Name
c = "Elementos"
Sheets(c).Cells.Clear
a = FullName(UBound(FullName))
Sheets(b).Cells.Copy Destination:=Workbooks(mybook).Sheets(c).Cells(1, 1)
Application.CutCopyMode = False
Workbooks(a).Close False
'VAMOS
Sheets("Elementos").Select
Range("D4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Calculo").Select
Range("B18").Select
ActiveSheet.Paste
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
'FIN VAMOS
'CENTRAR
Range("B18").Select
Range(Selection, Selection.End(xlDown)).Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
''FIN CENTRAR
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
Application.CutCopyMode = False
End Sub
Option Explicit
Sub ImportarData()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
wsDestino As Excel.Worksheet, _
rngOrigen As Excel.Range, _
NombreArchivo As String, _
Carpeta As String
nArchivo = 1
NombreArchivo = Dir()
ThisWorkbook.Activate
wsOrigen.Activate
rngOrigen.Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Errores:
rngOrigen.Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
End If
For n = 1 To 1
wsDestino.Activate
wsDestino.Cells(Columns.Count, 1).End(xlUp).Offset(1,
0).PasteSpecial xlPasteValues
Next n
Application.CutCopyMode = False
WorkBookOrigen.Save
WorkBookOrigen.Close
nArchivo = nArchivo + 1
Call progreso
Loop
j = nArchivo - 1
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Application.EnableEvents = True
ActiveSheet.DisplayPageBreaks = True
Application.CutCopyMode = False
Worksheets("Calculo").Select
' Worksheets("Calculo").Select
End Sub
Maximo = nArchivo - 1
Mitiempo = Timer
Do
" de " & i & " (" & Format(Maximo / i, "Percent") & ")"
DoEvents
Next contador
Application.StatusBar = False
End Sub
Conteo = 1
cNombreArchivo = Dir()
Conteo = Conteo + 1
Loop
i = Conteo - 1
End Sub
Option Explicit
Sub SAP2000_ABRIR()
mySapObject.ApplicationStart
'mySapObject.mySapModel.InitializeNewModel (kgf_m_C)
'ret = mySapObject.mySapModel.File.NewBlank
'initialize model
'at the end of your program ALWAYS terminate the objects in this
manner
End Sub
Sub SAP2000_CERRAR()
'dimension variables
mySapObject.ApplicationExit False
'at the end of your program ALWAYS terminate the objects in this
manner
End Sub
Sub Sap2000()
AttachToInstance = False
SpecifyPath = False
'if the above flag is set to True, specify the path to SAP2000 below
End Sub
Sub ORALE3()
'
'
'
Sheets("Destino").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(IF(RC[-12]=R[1]C[-12],""SI"",""NO""),""OK"")"
Range("M1").Select
Selection.AutoFill Destination:=Range("M1:M14714")
Range("M1:M14714").Select
Selection.AutoFilter
ActiveSheet.Range("$M$1:$M$14714").AutoFilter Field:=1,
Criteria1:="SI"
Range("M2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
ActiveSheet.Range("$M$1:$M$4869").AutoFilter Field:=1
Selection.ClearContents
Selection.AutoFilter
Range("M1").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(IF(RC[-12]=R[1]C[-12],""SI"",""NO""),""OK"")"
Range("M2").Select
Sheets("Calculo").Select
End Sub
Sub ptk()
'
'
'
Sheets("Destino").Select
Range("M1").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(IF(RC[-12]=R[1]C[-12],""SI"",""NO""),""OK"")"
Range("M1").Select
Selection.AutoFill Destination:=Range("M1:M19581")
Range("M1:M19581").Select
Selection.AutoFilter
ActiveSheet.Range("$M$1:$M$19581").AutoFilter Field:=1,
Criteria1:="SI"
Range("M2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
ActiveSheet.Range("$M$1:$M$6426").AutoFilter Field:=1
Selection.ClearContents
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Calculo").Select
ActiveSheet.Paste
Sheets("Destino").Select
ActiveWindow.SmallScroll Down:=-1083
ActiveWindow.ScrollRow = 5304
ActiveWindow.ScrollRow = 5278
ActiveWindow.ScrollRow = 5148
ActiveWindow.ScrollRow = 3867
ActiveWindow.ScrollRow = 3319
ActiveWindow.ScrollRow = 2247
ActiveWindow.ScrollRow = 1803
ActiveWindow.ScrollRow = 1307
ActiveWindow.ScrollRow = 1124
ActiveWindow.ScrollRow = 445
ActiveWindow.ScrollRow = 210
ActiveWindow.ScrollRow = 1
Range("E2").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=-102
Application.CutCopyMode = False
Selection.Copy
Sheets("Calculo").Select
Range("C18").Select
ActiveSheet.Paste
Sheets("Destino").Select
ActiveWindow.SmallScroll Down:=-198
ActiveWindow.ScrollRow = 6088
ActiveWindow.ScrollRow = 6062
ActiveWindow.ScrollRow = 5905
ActiveWindow.ScrollRow = 4076
ActiveWindow.ScrollRow = 3554
ActiveWindow.ScrollRow = 1882
ActiveWindow.ScrollRow = 1464
ActiveWindow.ScrollRow = 680
ActiveWindow.ScrollRow = 497
ActiveWindow.ScrollRow = 1
Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calculo").Select
Range("D18").Select
Range(Selection, Selection.End(xlDown)).Select
Range("E1048559").Select
End Sub
Sub pkx()
'
'
'
Sheets("Destino").Select
Range("M1").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(IF(RC[-12]=R[1]C[-11],""SI"",""NO""),""OK"")"
Range("M1").Select
Selection.AutoFill Destination:=Range("M1:M21138")
Range("M1:M21138").Select
End Sub
Sub ppo()
'
'
'
Sheets("Destino").Select
Range("M1").Select
ActiveCell.FormulaR1C1 = _
"=IFERROR(IF(RC[-12]=R[1]C[-12],""SI"",""NO""),""OK"")"
Range("M1").Select
Selection.AutoFill Destination:=Range("M1:M21138")
Range("M1:M21138").Select
Selection.AutoFilter
ActiveSheet.Range("$M$1:$M$21138").AutoFilter Field:=1,
Criteria1:="SI"
Range("M2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete
Selection.AutoFilter
Selection.ClearContents
ActiveWindow.Zoom = 75
ActiveWindow.SmallScroll Down:=-12
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=-664
Selection.Copy
Sheets("Calculo").Select
ActiveSheet.Paste
Sheets("Destino").Select
Range("E2").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calculo").Select
Range("C18").Select
ActiveSheet.Paste
Sheets("Destino").Select
ActiveWindow.SmallScroll Down:=-12
Range("B2").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Calculo").Select
Range("D18").Select
ActiveSheet.Paste
Range("A18:D18").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("A6929").Select
End Sub
Sub cvtr()
'
'
'
Range("E18").Select
Range(Selection, Selection.End(xlDown)).Select
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.NumberFormat = "0.00"
Range("A18").Select
End Sub