
Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("DATABASE").Select
ActiveSheet.Range("$A$1:$U$2213").AutoFilter Field:=1, Criteria1:="FY15" [qui mi servirebbe inserire il valore nella cella F6 del foglio Parameters]
ActiveSheet.Range("$A$1:$U$2213").AutoFilter Field:=2, Criteria1:= _
"02_Revised" [qui mi servirebbe inserire il valore nella cella F8 del foglio Parameters]
Rows("2212:2212").Select [Dovrei impostare i range correttamente, in modo che siano dinamici]
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
Range("A2207").Select [Dovrei impostare i range correttamente, in modo che siano dinamici]
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=3
Range("A2212").Select [Dovrei impostare i range correttamente, in modo che siano dinamici]
Sheets("Temporary").Select
Range("C2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("DATABASE").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("M2221").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveSheet.Range("$A$1:$U$6411").AutoFilter Field:=18, Criteria1:="0"
Rows("2213:2213").Select
Range("E2213").Activate
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$U$2314").AutoFilter Field:=18
Sheets("Template").Select
ActiveWorkbook.Save
End Sub
|
Sub Elimina_righe()
Dim i
For i = Range("A" & Rows.Count).End(xlUp).Row To 1 Step -1
If Cells(i, "A") = "FY15" Then (come Faccio a dirgli di prendere come valore di confronto la cella F6 del foglio Parameters?)
If Cells(i, "B") = "01_Budget" Then (come Faccio a dirgli di prendere come valore di confronto la cella F8 del foglio Parameters?)
Cells(i, "A").Select
Selection.EntireRow.Delete
End If
End If
Next i
End Sub
Sub Copia_Incolla()
'
' Macro5 Macro
'
'
Application.Goto Reference:="TEMP" (come Faccio a dirgli di copiare nella prima riga vuota? )
Selection.Copy
Sheets("DATABASE").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Sub Elimina_righe_0()
'
' Elimina_righe_0 Macro
'
'
Dim i
For i = Range("A" & Rows.Count).End(xlUp).Row To 1 Step -1
If Cells(i, "R") = 0 Then
Cells(i, "R").Select
Selection.EntireRow.Delete
End If
Next i
End Sub
|
Sub Elimina_righe()
Dim i
For i = Range("A" & Rows.Count).End(xlUp).Row To 1 Step -1
If Cells(i, "A") = sheets("Parameters").range("F6") Then
If Cells(i, "B") = sheets("Parameters").range("F8") Then
Cells(i, "A").EntireRow.Delete
End If
End If
Next i
End Sub
Sub Copia_Incolla()
LR =Sheets("DATABASE").Range("A" & Rows.Count).End(xlUp).Row + 1
Application.Goto Reference:="TEMP"
Selection.Copy
Sheets("DATABASE").cells(LR,1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
|
