Attribute VB_Name = "Module1" Sub rendez() Attribute rendez.VB_Description = "Rendező" Attribute rendez.VB_ProcData.VB_Invoke_Func = "r\n14" ' ' rendez Macro ' Rendez ' ' Keyboard Shortcut: Ctrl+r ' Rows("2:200").Select Selection.Copy Sheets.Add After:=ActiveSheet Sheets("Sheet2").Name = "H" ActiveSheet.Paste Sheets.Add After:=ActiveSheet Sheets("Sheet3").Select Sheets("Sheet3").Name = "B" ActiveSheet.Previous.Select Columns("A:E").Select Application.CutCopyMode = False Selection.Delete Shift:=xlToLeft Columns("B:H").Select Selection.Delete Shift:=xlToLeft Columns("C:D").Select Selection.Delete Shift:=xlToLeft Columns("D:D").Select Selection.Delete Shift:=xlToLeft Columns("A:B").Select Selection.Cut Range("K1").Select ActiveSheet.Paste Columns("A:B").Select Selection.Delete Shift:=xlToLeft Columns("C:C").Select ActiveWorkbook.Worksheets("H").Sort.SortFields.Clear ActiveWorkbook.Worksheets("H").Sort.SortFields.Add Key:=Range("C1"), SortOn _ :=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("H").Sort .SetRange Range("A1:J155") .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Range("A1").Select Cells.Find(What:="Biorganik", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Rows("7:139").Select Range("C7").Activate Selection.Cut Sheets("B").Select ActiveSheet.Paste Range("A1").Select Cells.Find(What:="Szállítás", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Rows("21:197").Select Application.CutCopyMode = False Selection.ClearContents Columns("E:H").Select Selection.Delete Shift:=xlToLeft Columns("D:D").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Columns("F:F").EntireColumn.AutoFit Columns("E:E").EntireColumn.AutoFit Columns("A:A").EntireColumn.AutoFit Columns("A:A").Select ActiveWorkbook.Worksheets("B").Sort.SortFields.Clear ActiveWorkbook.Worksheets("B").Sort.SortFields.Add Key:=Range("A1"), _ SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("B").Sort .SetRange Range("A1:F133") .Header = xlNo .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Sheets("H").Select Columns("A:A").Select ActiveWorkbook.Worksheets("H").Sort.SortFields.Clear ActiveWorkbook.Worksheets("H").Sort.SortFields.Add Key:=Range("A1"), SortOn _ :=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal Columns("J:J").EntireColumn.AutoFit Range("H1").Select ActiveCell.FormulaR1C1 = "=ROUND(RC[-2]/1.29*(1+(RC[-1]/100)),0)" Range("H1").Select Selection.Copy Range("H2:H100").Select ActiveSheet.Paste Range("A1").Select Columns("I:I").EntireColumn.AutoFit Columns("A:A").EntireColumn.AutoFit Columns("A:A").Select Application.CutCopyMode = False ActiveWorkbook.Worksheets("H").Sort.SortFields.Clear ActiveWorkbook.Worksheets("H").Sort.SortFields.Add Key:=Range("A1"), SortOn _ :=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal With ActiveWorkbook.Worksheets("H").Sort .SetRange Range("A1:J199") .Header = xlGuess .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Columns("H:H").Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With Columns("E:G").Select Range("G1").Activate Selection.Delete Shift:=xlToLeft Columns("D:D").Select With Selection .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .AddIndent = False .IndentLevel = 0 .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With End Sub