0% found this document useful (0 votes)
98 views3 pages

Excel Macros for Data Management

The document contains definitions for multiple macros that perform operations on an Excel spreadsheet. Macro1 copies and pastes values from multiple ranges. Macro2 copies and pastes a single cell. Macro3 clears the contents of multiple ranges. MacroTotal calls Macro1, Macro2 and Macro3. Macro4 copies multiple sheets and pastes them after other sheets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
98 views3 pages

Excel Macros for Data Management

The document contains definitions for multiple macros that perform operations on an Excel spreadsheet. Macro1 copies and pastes values from multiple ranges. Macro2 copies and pastes a single cell. Macro3 clears the contents of multiple ranges. MacroTotal calls Macro1, Macro2 and Macro3. Macro4 copies multiple sheets and pastes them after other sheets.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Sub Macro1()

'
' Macro1 Macro Borrar Aleatorios
'

'
'operacion #1
Range("Q4:R23").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

'operacion #2
Range("W4:X23").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'ActiveWindow.SmallScroll ToRight:=8

'operacion #3
Range("AC4:AD23").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

'operacion #4
Range("AI4:AJ23").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

'operacion #5
Range("AO4:AP23").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

'operacion #6
Range("AU4:AV23").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

'operacion #7
Range("BA4:BB23").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub

Sub Macro2()
'
' Macro2 Borrar de vuelta a cero generado
'

'
Sheets("P (1)").Select
Range("L5").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

Range("O7:O9").Select
Application.CutCopyMode = False
Selection.ClearContents

End Sub

Sub Macro3()
'
' Macro3 Macro Borrar 0.9-1.0-1.15

Sheets("P (1)").Activate
'1
Range("T25:U27").Select
Selection.ClearContents
'2
Range("Z25:AA27").Select
Selection.ClearContents
'3
Range("AF25:AG27").Select
Selection.ClearContents
'4
Range("AL25:AM27").Select
Selection.ClearContents
'5
Range("AR25:AS27").Select
Selection.ClearContents
'6
Range("AX25:AY27").Select
Selection.ClearContents
'7
Range("BD25:BE27").Select
Selection.ClearContents

End Sub
Sub MacroTotal()
'
' MacroTotal Macro
'

'
Sheets(Array("P (1)", "P (2)", "P (3)", "P (4)", "P (5)", "P (6)", "P (7)", "P
(8)", _
"P (9)", "P (10)", "P (11)", "P (12)")).Select

Call Macro1
Call Macro2
Call Macro3
Sheets("P (1)").Activate
End Sub

Sub Macro4()
'
' Macro4 Macro
'

'
Sheets("P (1)").Select
Sheets("P (1)").Copy After:=Sheets(4)

Sheets("P (2)").Select
Sheets("P (2)").Copy After:=Sheets(5)

Sheets("P (3)").Select
Sheets("P (3)").Copy After:=Sheets(6)

Sheets("P (4)").Select
Sheets("P (4)").Copy After:=Sheets(7)

Sheets("P (5)").Select
Sheets("P (5)").Copy After:=Sheets(8)

Sheets("P (6)").Select
Sheets("P (6)").Copy After:=Sheets(9)

Sheets("P (7)").Select
Sheets("P (7)").Copy After:=Sheets(10)

Sheets("P (8)").Select
Sheets("P (8)").Copy After:=Sheets(11)

Sheets("P (9)").Select
Sheets("P (9)").Copy After:=Sheets(12)

Sheets("P (10)").Select
Sheets("P (10)").Copy After:=Sheets(13)

Sheets("P (11)").Select
Sheets("P (11)").Copy After:=Sheets(14)
End Sub

You might also like