Sub bringitalltogether()
'this macro brings all macros for collection together
Application.ScreenUpdating = False
Application.EnableEvents = False
Sheets("HIDDEN FINAL DVC").Visible = True
Sheets("HIDDEN FINAL DEF_VAR").Visible = True
Sheets("HIDDEN FINAL RATE RIDERS").Visible = True
Sheets("HIDDEN NETWORKING").Visible = True
Sheets("HIDDEN CONNECTING").Visible = True
IMPORT_DVC
IMPORT_PROPOSED_RR
IMPORT_DEF_VAR
IMPORT_networking
IMPORT_connecting
copyalldatatomainsheet
Sheets("HIDDEN FINAL DVC").Visible = false
Sheets("HIDDEN FINAL DEF_VAR").Visible = false
Sheets("HIDDEN FINAL RATE RIDERS").Visible = false
Sheets("HIDDEN NETWORKING").Visible = false
Sheets("HIDDEN CONNECTING").Visible = false
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Sub IMPORT_DVC()
Application.ScreenUpdating = False
Application.EnableEvents = False
Sheets("HIDDEN FINAL DVC").Select 'i get the error when the codes hits here
Rows("2:20000").Select
Selection.ClearContents
Range("A2").Select
Sheets("HIDDEN FINAL DVC").Select
Range("A2").Select
ActiveCell.FormulaR1C1 = "=hidden1!R[-1]C"
Range("B2").Select
ActiveCell.FormulaR1C1 = "prices"
Range("C2").Select
ActiveCell.FormulaR1C1 = _
"=ROUND(VLOOKUP(hidden1!R[-1]C[-2], '17. GDP-IPI - X'!R[20]C[-2]:R[105]C[12], 14,0),4)"
Range("d2").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(hidden1!R[-1]C[-3], '17. GDP-IPI - X'!R22C1:R107C15, 10,0)"
Range("A2:D2").Select
Selection.AutoFill Destination:=Range("A2:D23"), Type:=xlFillDefault
Range("A2:D23").Select
Range("A2").Select
Range("E2").Select
ActiveCell.FormulaR1C1 = "=IF(ISERROR(RC[-1]), ""DELETE"", """")"
Range("E2").Select
Selection.AutoFill Destination:=Range("E2:E23"), Type:=xlFillDefault
Range("E2:E23").Select
Range("E9").Select
For i = 23 To 2 Step -1
If Range("E" & i).Value = "DELETE" Then
Rows(i & ":" & i).Select
Selection.Delete
End If
Next i
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub