Open PerfectEye opened 6 years ago
Sub vLOOKbis() ' ' vLOOKbis Makro '
'
Dim sht As Worksheet Dim LastRow As Long
Set sht = ActiveSheet LastRow = sht.Cells.Find("*", searchorder:=xlByRows, searchdirection:=xlPrevious).Row
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],Raport!R2C1:R35123C10,2,0)"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],Raport!R2C1:R35123C10,6,0)"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],Raport!R2C1:R35123C10,5,0)"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-4],Raport!R2C1:R35123C10,9,0)"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-5],Raport!R2C1:R35123C10,7,0)"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-6],Raport!R2C1:R35123C10,8,0)"
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-7],Raport!R2C1:R35123C10,3,0)"
ActiveCell.Offset(0, -6).Range("A1:G1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1:G" & LastRow - 2).Select
ActiveSheet.Paste
End Sub
Sub vLOOKbis() ' ' vLOOKbis Makro '
' ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-1],Raport!R2C1:R35123C10,2,0)" ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-2],Raport!R2C1:R35123C10,6,0)" ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],Raport!R2C1:R35123C10,5,0)" ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-4],Raport!R2C1:R35123C10,9,0)" ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-5],Raport!R2C1:R35123C10,7,0)" ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-6],Raport!R2C1:R35123C10,8,0)" ActiveCell.Offset(0, 1).Range("A1").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-7],Raport!R2C1:R35123C10,3,0)" ActiveCell.Offset(0, -6).Range("A1:G1").Select Selection.AutoFill Destination:=ActiveCell.Range("A1:G216") ActiveCell.Range("A1:G216").Select
End Sub