VBS Crash

MikkoChelovek

New Member
Joined
Feb 10, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,
I'm using the following code on vbs, and it's crashing at Vlook-up/Paste - Runtime Error 1004 -

Paste Method of Worksheet Class Failed​


Can you help me please, fix this?

1644485313559.png


Sub Macro1()
'
' Macro1 Macro
'
' Keyboard Shortcut: Ctrl+q
'
Range("C4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("C4").Select
ActiveCell.FormulaR1C1 = "=""Batch #_new_""&TEXT(RC[-1],""dd.mm.yyyy"")"
Range("C4").Select
Selection.AutoFill Destination:=Range("C4:C64")
Range("C4:C64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C3").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Batchcode"
Range("D3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("E3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.ScrollRow = 1048548
ActiveWindow.ScrollRow = 1046896
ActiveWindow.ScrollRow = 1035337
ActiveWindow.ScrollRow = 1022127
ActiveWindow.ScrollRow = 1003964
ActiveWindow.ScrollRow = 602709
ActiveWindow.ScrollRow = 521797
ActiveWindow.ScrollRow = 485470
ActiveWindow.ScrollRow = 249340
ActiveWindow.ScrollRow = 237781
ActiveWindow.ScrollRow = 227874
ActiveWindow.ScrollRow = 150265
ActiveWindow.ScrollRow = 146962
ActiveWindow.ScrollRow = 142008
ActiveWindow.ScrollRow = 137055
ActiveWindow.ScrollRow = 99076
ActiveWindow.ScrollRow = 94122
ActiveWindow.ScrollRow = 90820
ActiveWindow.ScrollRow = 84215
ActiveWindow.ScrollRow = 59446
ActiveWindow.ScrollRow = 57794
ActiveWindow.ScrollRow = 56143
ActiveWindow.ScrollRow = 37979
ActiveWindow.ScrollRow = 36328
ActiveWindow.ScrollRow = 34677
ActiveWindow.ScrollRow = 33026
ActiveWindow.ScrollRow = 11559
ActiveWindow.ScrollRow = 8257
ActiveWindow.ScrollRow = 4954
ActiveWindow.ScrollRow = 3303
ActiveWindow.ScrollRow = 1
Range("D3").Select
ActiveSheet.Paste
Range("E3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.ClearContents
Range("H3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.ScrollRow = 1043595
ActiveWindow.ScrollRow = 822326
ActiveWindow.ScrollRow = 173382
ActiveWindow.ScrollRow = 118891
ActiveWindow.ScrollRow = 1
Range("E3").Select
ActiveSheet.Paste
Range("H3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.ClearContents
Columns("H:H").Select
Range("H2").Activate
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.SmallScroll Down:=-12
Sheets("Fisier Iasi").Select
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
Sheets("Sablon").Select
Range("H4").Select
ActiveCell.FormulaR1C1 = ""
Columns("E:E").Select
Selection.NumberFormat = "0.00"
Sheets("Fisier Iasi").Select
Columns("B:B").Select
Range("B2").Activate
Sheets("Sablon").Select
Range("H4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(E4,'Fisier Iasi'!B2:P1048576,15,0"
Range("H4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(E4,'Fisier Iasi'!B2:P1048576,15,0)"
Columns("H:I").Select
Selection.NumberFormat = "General"
Range("H4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'Fisier Iasi'!R[-2]C[-6]:R[1048572]C[8],15,0)"
Range("H4").Select
Selection.ClearContents
Columns("H:I").Select
Selection.NumberFormat = "General"
Range("H4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'Fisier Iasi'!R[-2]C[-6]:R[1048572]C[8],15,0)"
Range("H4").Select
Selection.AutoFill Destination:=Range("H4:H64")
Range("H4:H64").Select
Selection.ClearContents
Range("E4").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1032036
ActiveWindow.ScrollRow = 1
Range("H4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'Fisier Iasi'!R[-2]C[-6]:R[1048572]C[8],15,0)"
Range("H4").Select
Selection.AutoFill Destination:=Range("H4:H64")
Range("H4:H64").Select
Range("H4").Select
Selection.AutoFill Destination:=Range("H4:H5"), Type:=xlFillDefault
Range("H4:H5").Select
Selection.AutoFill Destination:=Range("H4:H6"), Type:=xlFillDefault
Range("H4:H6").Select
Range("H5").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("H5").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'Fisier Iasi'!R[-3]C[-6]:R[1048571]C[8],15,0)"
Range("H5").Select
Selection.AutoFill Destination:=Range("H5:H64")
Range("H5:H64").Select
Range("H5").Select
Selection.AutoFill Destination:=Range("H5:H7"), Type:=xlFillDefault
Range("H5:H7").Select
Range("H5").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'Fisier Iasi'!R[-3]C[-6]:R[1048571]C[8],15,0)"
Range("H4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],'Fisier Iasi'!R2C2:R1048576C16,15,0)"
Range("H4").Select
Selection.AutoFill Destination:=Range("H4:H64")
Range("H4:H64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("I4").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-1]=RC[-3]"
Range("I4").Select
Selection.AutoFill Destination:=Range("I4:I64")
Range("I4:I64").Select
Rows("3:3").Select
Selection.AutoFilter
Range("I7").Select
Selection.AutoFilter
Range("H3:I4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("H4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'Fisier Iasi'!R[-2]C[-6]:R[1048572]C[9],16,0)"
Range("H4").Select
Selection.AutoFill Destination:=Range("H4:H64")
Range("H4:H64").Select
Range("H4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],'Fisier Iasi'!R2C2:R1048576C17,16,0)"
Range("H4").Select
Selection.AutoFill Destination:=Range("H4:H64")
Range("H4:H64").Select
Range("I4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-1]=RC[-2]"
Range("H4").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.NumberFormat = "0.00"
Columns("H:H").ColumnWidth = 17.56
Selection.NumberFormat = "0.000"
Selection.NumberFormat = "0.0000"
Selection.NumberFormat = "0.000"
Selection.NumberFormat = "0.00"
Selection.NumberFormat = "0.0"
Selection.NumberFormat = "0"
Columns("G:G").Select
Selection.NumberFormat = "0.00"
Range("G4:G5").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.ScrollRow = 1046897
ActiveWindow.ScrollRow = 1
Range("I4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-1]=RC[-2]"
Range("I4").Select
Selection.AutoFill Destination:=Range("I4:I64")
Range("I4:I64").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-30
Columns("H:I").Select
Selection.Delete Shift:=xlToLeft
Range("F3:G3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 12611584
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("C3:G3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("H11").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
Range("H4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'Fisier Iasi'!R[-2]C[-6]:R[1048572]C[21],28,0)"
Range("H4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-3],'Fisier Iasi'!R[-2]C[-6]:R[1048572]C[21],28,0)"
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],'Fisier Iasi'!R2C2:R1048576C29,28,0)"
Range("H4").Select
Selection.AutoFill Destination:=Range("H4:H64")
Range("H4:H64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("H:H").Select
Selection.Replace What:="""0""", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Selection.Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Range("H2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "2_Nume Girant"
Range("H3").Select
ActiveCell.FormulaR1C1 = "2_Nume Girant"
Range("H3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("I3").Select
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
Range("I3:AZ3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
Range("N3").Select
ActiveSheet.Paste
Range("M7").Select
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
Range("I2").Select
ActiveCell.FormulaR1C1 = "2_CNP "
Range("I3").Select
ActiveSheet.Paste
Range("J2").Select
ActiveCell.FormulaR1C1 = "ADRESA_PARTE_CTR"
Range("J3").Select
ActiveSheet.Paste
Range("K2").Select
ActiveCell.FormulaR1C1 = "LOCALITATE_PARTE_CTR"
Range("K3").Select
ActiveSheet.Paste
Range("L2").Select
ActiveCell.FormulaR1C1 = "JUDET_PARTE_CTR"
Range("L3").Select
ActiveSheet.Paste
Range("M2").Select
ActiveCell.FormulaR1C1 = "Code postal Girant"
Range("M3").Select
ActiveSheet.Paste
Range("I4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-4],'Fisier Iasi'!R[-2]C[-7]:R[1048572]C[21],29,0)"
Range("I4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-4],'Fisier Iasi'!R2C2:R1048576C30,29,0)"
Range("I4").Select
Selection.AutoFill Destination:=Range("I4:I64")
Range("I4:I64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("I:I").Select
Application.CutCopyMode = False
Selection.NumberFormat = "General"
Selection.ColumnWidth = 13.67
Selection.NumberFormat = "0.00"
Selection.NumberFormat = "0.0"
Selection.NumberFormat = "0"
Range("I3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("I9").Select
ActiveCell.FormulaR1C1 = "0"
Columns("I:I").Select
Selection.Replace What:="""0""", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Selection.Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Rows("3:3").Select
Selection.AutoFilter
ActiveSheet.Range("$A$3:$BE$64").AutoFilter Field:=9, Criteria1:="0"
Range("I4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Selection.AutoFilter
Range("J8").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
Range("K4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-6],'Fisier Iasi'!R[-2]C[-9]:R[1048572]C[28],38,0)"
Range("K4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-6],'Fisier Iasi'!R2C2:R1048576C39,38,0)"
Range("K4").Select
Selection.AutoFill Destination:=Range("K4:K64")
Range("K4:K64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("K3").Select
Application.CutCopyMode = False
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Columns("K:K").Select
Selection.Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Range("L4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-7],'Fisier Iasi'!R[-2]C[-10]:R[1048572]C[28],39,0)"
Range("L4").Select
Selection.AutoFill Destination:=Range("L4:L64")
Range("L4:L64").Select
Range("L4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-7],'Fisier Iasi'!R2C2:R1048576C40,39,0)"
Range("L4").Select
Selection.AutoFill Destination:=Range("L4:L64")
Range("L4:L64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("L3").Select
Application.CutCopyMode = False
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Columns("L:L").Select
Selection.Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Range("J8").Select
Sheets("Fisier Iasi").Select
ActiveWindow.ScrollRow = 1048548
ActiveWindow.ScrollRow = 1046896
ActiveWindow.ScrollRow = 1045245
ActiveWindow.ScrollRow = 1036989
ActiveWindow.ScrollRow = 1025430
ActiveWindow.ScrollRow = 1008917
ActiveWindow.ScrollRow = 518495
ActiveWindow.ScrollRow = 388045
ActiveWindow.ScrollRow = 336857
ActiveWindow.ScrollRow = 290621
ActiveWindow.ScrollRow = 246038
ActiveWindow.ScrollRow = 52841
ActiveWindow.ScrollRow = 37979
ActiveWindow.ScrollRow = 26421
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 43
ActiveWindow.ScrollColumn = 45
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 54
ActiveWindow.ScrollColumn = 53
ActiveWindow.ScrollColumn = 52
ActiveWindow.ScrollColumn = 50
ActiveWindow.ScrollColumn = 48
ActiveWindow.ScrollColumn = 46
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
Range("AG2:AG6").Select
ActiveWindow.SmallScroll Down:=15
Range("AG30").Select
ActiveWindow.SmallScroll Down:=-33
Range("AI2:AI6").Select
ActiveWindow.SmallScroll Down:=15
Range("AH30").Select
Sheets("Fisier Iasi").Select
ActiveWindow.SmallScroll Down:=-30
Columns("AO:AO").Select
Range("AO2").Activate
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("AO7").Select
ActiveCell.FormulaR1C1 = _
"=""Strada ""&RC[-8]&"", numar ""&RC[-7]&"", bloc ""&RC[-6]&"", scara ""&RC[-5]&"", etaj """
Range("AO8").Select
Columns("AN:AN").ColumnWidth = 11.78
Columns("AO:AO").ColumnWidth = 31.22
Range("AO7").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=""Strada ""&RC[-8]&"", numar ""&RC[-7]&"", bloc ""&RC[-6]&"", scara ""&RC[-5]&"", etaj ""&RC[-4]&"", apartament ""&RC[-3]"
Range("AO7").Select
Selection.AutoFill Destination:=Range("AO7:AO67")
Range("AO7:AO67").Select
ActiveWindow.SmallScroll Down:=15
Range("AO30").Select
ActiveWindow.SmallScroll Down:=-39
Columns("AO:AO").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sablon").Select
Range("J4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-5],'Fisier Iasi'!R[-2]C[-8]:R[1048572]C[31],40,0)"
Range("J4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-5],'Fisier Iasi'!R2C2:R1048576C41,40,0)"
Range("J4").Select
Selection.AutoFill Destination:=Range("J4:J64")
Range("J4:J64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("J3").Select
Application.CutCopyMode = False
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Rows("3:3").Select
Range("D3").Activate
Selection.AutoFilter
ActiveSheet.Range("$A$3:$BE$64").AutoFilter Field:=10, Criteria1:= _
"Strada , numar , bloc , scara , etaj , apartament"
Range("J4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Selection.AutoFilter
Range("J5").Select
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
Sheets("Fisier Iasi").Select
ActiveWindow.ScrollRow = 1048548
ActiveWindow.ScrollRow = 1046896
ActiveWindow.ScrollRow = 1041942
ActiveWindow.ScrollRow = 1032035
ActiveWindow.ScrollRow = 1020476
ActiveWindow.ScrollRow = 460701
ActiveWindow.ScrollRow = 326949
ActiveWindow.ScrollRow = 1
Columns("AO:AO").Select
Selection.Delete Shift:=xlToLeft
Sheets("Sablon").Select
Range("M3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
ActiveWindow.ScrollColumn = 7
Columns("I:M").Select
Range("M1").Activate
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
Columns("A:M").Select
Range("M1").Activate
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
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
Rows("3:3").Select
Range("L3").Activate
Selection.AutoFilter
Range("N3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("O3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("P3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("Q3:R3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
Range("S3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("T3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("U3").Select
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
Columns("V:V").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("U:U").Select
Selection.NumberFormat = "0.00"
Range("V4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(E4,'Fisier Iasi'!B2:H1048576,7,0"
Columns("V:V").Select
Selection.NumberFormat = "General"
Range("V4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-17],'Fisier Iasi'!R[-2]C[-20]:R[1048572]C[-14],7,0)"
Range("V4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-17],'Fisier Iasi'!R[-2]C[-20]:R[1048572]C[-14],7,0)"
Range("V4").Select
Selection.AutoFill Destination:=Range("V4:V64")
Range("V4:V64").Select
Range("V4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-17],'Fisier Iasi'!R2C2:R1048576C8,7,0)"
Range("V5").Select
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
Range("V4").Select
Selection.AutoFill Destination:=Range("V4:V64")
Range("V4:V64").Select
Selection.Copy
Range("U4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0.000"
Selection.NumberFormat = "0.00"
Selection.NumberFormat = "0.0"
Selection.NumberFormat = "0"
Range("U3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Columns("V:V").Select
Selection.ClearContents
Range("V4").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-17],'Fisier Iasi'!R[-2]C[-20]:R[1048572]C[-13],8,0)"
Range("V4").Select
Selection.AutoFill Destination:=Range("V4:V64")
Range("V4:V64").Select
Range("V4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-17],'Fisier Iasi'!R2C2:R1048576C9,8,0)"
Range("V4").Select
Selection.AutoFill Destination:=Range("V4:V64")
Range("V4:V64").Select
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "dd.mm.yyyy"
Columns("V:V").Select
Selection.Replace What:="/", Replacement:="-", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Selection.Replace What:=".", Replacement:="-", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Selection.Replace What:=".", Replacement:="-", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Selection.Replace What:=",", Replacement:="-", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Columns("V:V").Select
Selection.NumberFormat = "dd.mm.yyyy"
Columns("W:W").Select
Selection.NumberFormat = "dd.mm.yyyy"
Columns("W:W").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("W4").Select
ActiveCell.FormulaR1C1 = "=TEXT(RC[-1],""dd.mm.yyyy"")"
Range("W4").Select
Selection.AutoFill Destination:=Range("W4:W64")
Range("W4:W64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("W:W").Select
Selection.Replace What:="-", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Range("V4").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.ClearContents
Range("V4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[1]=RC[2]"
Range("V4").Select
Selection.AutoFill Destination:=Range("V4:V64")
Range("V4:V64").Select
Range("X3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Columns("V:W").Select
Range("W1").Activate
Selection.Delete Shift:=xlToLeft
Columns("X:X").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.SmallScroll Down:=-3
Selection.Delete Shift:=xlToLeft
ActiveWindow.SmallScroll Down:=-12
Range("W3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Cut
Range("X6").Select
Application.CutCopyMode = False
Selection.AutoFilter
Range("W3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Cut
Range("X3").Select
ActiveSheet.Paste
Range("X3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-18
ActiveWindow.ScrollRow = 1
Range("W3").Select
ActiveSheet.Paste
Range("W3:X3").Select
Application.CutCopyMode = False
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("X13").Select
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
Range("Y3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Columns("Y:Y").Select
Selection.NumberFormat = "0.00"
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 1
Columns("A:B").Select
Range("B1").Activate
Selection.NumberFormat = "dd.mm.yyyy"
Range("A3:B3").Select
Range("B3").Activate
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("I14").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
Columns("Z:Z").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("Z4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[4]+RC[5]"
Range("Z4").Select
Selection.AutoFill Destination:=Range("Z4:Z64")
Range("Z4:Z64").Select
Range("AA3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("AA2").Select
ActiveCell.FormulaR1C1 = "Principal (SOLD_PR_CRT+SOLD_PR_RES) "
With ActiveCell.Characters(Start:=1, Length:=35).Font
.Name = "Calibri"
.FontStyle = "Regular"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
With ActiveCell.Characters(Start:=36, Length:=1).Font
.Name = "Times New Roman"
.FontStyle = "Regular"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Range("AA3").Select
ActiveCell.FormulaR1C1 = "Principal (SOLD_PR_CRT+SOLD_PR_RES) "
Range("Y3").Select
Selection.Copy
Range("AA3").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("Z4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-15
ActiveWindow.ScrollRow = 1
Range("AA4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("Z4").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.ClearContents
Columns("AA:AA").Select
Selection.NumberFormat = "0.00"
Range("Z4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[6]+RC[7]+RC[8]"
Range("Z4").Select
Selection.AutoFill Destination:=Range("Z4:Z64")
Range("Z4:Z64").Select
Selection.Copy
Range("AB4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0.00"
Range("AB2").Select
ActiveCell.FormulaR1C1 = _
"Dobanda legala (SOLD_DB_CRT+SOLD_DB_RES+SOLD_CREA_REST) "
With ActiveCell.Characters(Start:=1, Length:=55).Font
.Name = "Calibri"
.FontStyle = "Regular"
.Size = 11
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
With ActiveCell.Characters(Start:=56, Length:=1).Font
.Name = "Times New Roman"
.FontStyle = "Regular"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
Range("AB3").Select
ActiveCell.FormulaR1C1 = _
"Dobanda legala (SOLD_DB_CRT+SOLD_DB_RES+SOLD_CREA_REST) "
Range("AA3").Select
Selection.Copy
Range("AB3").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("Z4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("AE11").Select
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
Range("AC3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("AC2").Select
ActiveCell.FormulaR1C1 = "SOLD_COMIS"
Range("AC3").Select
ActiveCell.FormulaR1C1 = "SOLD_COMIS"
Range("AB3").Select
Selection.Copy
Range("AC3").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("AC4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[6]"
Range("AC4").Select
Selection.AutoFill Destination:=Range("AC4:AC64")
Range("AC4:AC64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0.00"
Range("Z4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-1]=(RC[1]+RC[2]+RC[3])"
Range("Z4").Select
Selection.AutoFill Destination:=Range("Z4:Z64")
Range("Z4:Z64").Select
Rows("3:3").Select
Range("Y3").Activate
Selection.AutoFilter
Range("Z11").Select
Selection.AutoFilter
Columns("Z:Z").Select
Selection.Delete Shift:=xlToLeft
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 44
ActiveWindow.ScrollColumn = 42
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
Columns("AC:AC").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
Range("AC4").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-4]-RC[-3]-RC[-2]-RC[-1]"
Range("AC4").Select
ActiveCell.FormulaR1C1 = "=RC[-4]-RC[-3]-RC[-2]-RC[-1]=0"
Range("AC4").Select
ActiveCell.FormulaR1C1 = "=RC[-4]-RC[-3]-RC[-2]-RC[-1]=""0"""
Range("AC4").Select
ActiveCell.FormulaR1C1 = "=RC[-4]-RC[-3]-RC[-2]-RC[-1]"
Range("AC4").Select
Selection.AutoFill Destination:=Range("AC4:AC64")
Range("AC4:AC64").Select
Rows("3:3").Select
Range("W3").Activate
Selection.AutoFilter
Range("AC4").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
ActiveWindow.ScrollRow = 1
Range("AD4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "0.00"
Columns("AC:AC").Select
Selection.Delete Shift:=xlToLeft
Range("AB3").Select
Selection.Copy
Range("AC3").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("AC2").Select
ActiveCell.FormulaR1C1 = _
"Alte creante atasate (EXPUNERE_VALUTA -Principal - Dobanda Legala -Sold_COMIS)"
Range("AC3").Select
ActiveCell.FormulaR1C1 = _
"Alte creante atasate (EXPUNERE_VALUTA -Principal - Dobanda Legala -Sold_COMIS)"
Range("AB10").Select
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
Range("AD3:AJ3").Select
Range("AJ3").Activate
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("AK3").Select
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 31
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
Range("AD3").Select
ActiveSheet.Paste
Range("AD3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
Range("AE3:AF4").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("AG3").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Range("AE3").Select
ActiveSheet.Paste
Range("AE3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Columns("AE:AE").Select
Selection.NumberFormat = "dd.mm.yyyy"
Range("AF3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("AG3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Selection.NumberFormat = "dd.mm.yyyy"
Columns("AG:AG").Select
Selection.NumberFormat = "dd.mm.yyyy"
Range("AH3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 32
Range("AI3:AJ3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
Range("AK3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
ActiveWorkbook.Save
Range("AK3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("AL3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("AL3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("AM3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Range("AL3").Select
ActiveSheet.Paste
Range("AL3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("AM11").Select
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 37
Range("AN3:AO3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Cut
Range("AM3").Select
ActiveSheet.Paste
Range("AM3:AN3").Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("AL2").Select
ActiveCell.FormulaR1C1 = "Telefon Mobil"
Range("AL3").Select
ActiveCell.FormulaR1C1 = "Telefon Mobil"
Range("AM2").Select
ActiveCell.FormulaR1C1 = "Telefon Mobil 2"
Range("AM3").Select
ActiveCell.FormulaR1C1 = "Telefon Mobil 2"
Range("AN2").Select
ActiveCell.FormulaR1C1 = "TELEFON Mobil 3"
Range("AN3").Select
ActiveCell.FormulaR1C1 = "TELEFON Mobil 3"
Range("AK2").Select
ActiveCell.FormulaR1C1 = "Cod postal titular"
Range("AK3").Select
ActiveSheet.Paste
Range("AK7").Select
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 34
Range("AK3").Select
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 39
Range("AP3:AQ3").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Selection.ClearContents
Range("AO3:AP3").Select
With Selection.Interior
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Columns("AO:AO").Select
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
Columns("AP:AP").Select
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("AQ2").Select
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 41
Range("AQ2").Select
ActiveCell.FormulaR1C1 = "Telefon Mobil_Girant"
Range("AQ3").Select
ActiveSheet.Paste
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 255
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With Selection.Font
.ThemeColor = xlThemeColorDark1
.TintAndShade = 0
End With
Range("AR2").Select
ActiveCell.FormulaR1C1 = "Telefon Mobil 2_Girant"
Range("AR3").Select
ActiveSheet.Paste
Range("AQ3").Select
Selection.Copy
Range("AR3:AZ3").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("AS2").Select
ActiveCell.FormulaR1C1 = "Telefon Mobil 3_Girant"
Range("AS3").Select
ActiveCell.FormulaR1C1 = "Telefon Mobil 3_Girant"
Range("AT2").Select
ActiveCell.FormulaR1C1 = "Telefon Fix_Girant"
Range("AT3").Select
ActiveCell.FormulaR1C1 = "Telefon Fix_Girant"
Range("AU2").Select
ActiveCell.FormulaR1C1 = "Denumire contract credit"
Range("AU3").Select
ActiveSheet.Paste
Range("AV2").Select
ActiveCell.FormulaR1C1 = "Denumire alt contract_1"
Range("AV3").Select
ActiveSheet.Paste
Range("AW2").Select
ActiveCell.FormulaR1C1 = "IBAN Conturi_alt contract_1"
Range("AW3").Select
ActiveSheet.Paste
Range("AX2").Select
ActiveCell.FormulaR1C1 = "Denumire alt contract_2"
Range("AX3").Select
ActiveSheet.Paste
Range("AY2").Select
ActiveCell.FormulaR1C1 = "IBAN Conturi_alt contract_2"
Range("AY3").Select
ActiveSheet.Paste
Range("AZ2").Select
ActiveCell.FormulaR1C1 = "Cod obiectii garantii"
Range("AZ3").Select
ActiveSheet.Paste
Columns("AR:AZ").Select
Range("AZ1").Activate
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("AU4").Select
ActiveWorkbook.Save
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[-42],'Fisier Iasi'!R[-2]C[-45]:R[1048572]C[-37],9,0)"
Range("AU4").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-42],'Fisier Iasi'!R2C2:R1048576C10,9,0)"
Range("AU4").Select
Selection.AutoFill Destination:=Range("AU4:AU64")
Range("AU4:AU64").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 41
Range("BA4").Select
Application.CutCopyMode = False
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=PROPER(RC[-6])"
Range("BA4").Select
Selection.AutoFill Destination:=Range("BA4:BA64")
Range("BA4:BA64").Select
Selection.Copy
Range("AU4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("BA:BA").Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Range("AW7").Select
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Rows("1:1").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A1").Select
ActiveCell.FormulaR1C1 = "=R[2]C=R[43]C"
Range("A1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=R[2]C=R[3]C"
Range("A1").Select
Selection.AutoFill Destination:=Range("A1:AZ1"), Type:=xlFillDefault
Range("A1:AZ1").Select
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 38
Range("AO3").Select
ActiveCell.FormulaR1C1 = "TELEFON Fix"
Range("AO4").Select
ActiveSheet.Paste
Range("AP3").Select
ActiveCell.FormulaR1C1 = "Telefon serviciu"
Range("AP4").Select
ActiveSheet.Paste
Range("AP10").Select
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Range("G10").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 13
ActiveWindow.ScrollColumn = 14
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 16
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 18
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 20
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
ActiveWindow.ScrollColumn = 25
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 27
ActiveWindow.ScrollColumn = 28
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 30
ActiveWindow.ScrollColumn = 31
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 33
ActiveWindow.ScrollColumn = 34
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 36
ActiveWindow.ScrollColumn = 37
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 39
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 41
ActiveWindow.ScrollColumn = 40
ActiveWindow.ScrollColumn = 38
ActiveWindow.ScrollColumn = 35
ActiveWindow.ScrollColumn = 32
ActiveWindow.ScrollColumn = 29
ActiveWindow.ScrollColumn = 26
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 19
ActiveWindow.ScrollColumn = 17
ActiveWindow.ScrollColumn = 15
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
ActiveWorkbook.Save
End Sub
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Try changing it to this:
- drop the R1C1 and add the closing ")"

VBA Code:
ActiveCell.Formula2 = "=VLOOKUP(E4, 'Fisier Iasi'!B2:P1048576, 15,0)"

Note: setting the range to over 1 million rows is not a good idea.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top