2 つのマクロをマージする必要があります & 同じことを試しましたが、最初のマクロの最後にエラーが表示されます。
大きい
Sub ERS()
'
' ERS Macro
'
'
ActiveWindow.SmallScroll Down:=-6
Range("E1:E41").Select
Selection.End(xlUp).Select
Range("E2:E100").Select
Selection.TextToColumns Destination:=Range("E2"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=".", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, _
1), Array(6, 1), Array(7, 1), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1)), _
TrailingMinusNumbers:=True
Range("P2").Select
ActiveCell.FormulaR1C1 = "=RC[-5]&RC[-4]"
Range("P2").Select
Selection.Copy
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("P2:P100"), Type:=xlFillDefault
Range("P2:P100").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=-21
Selection.Replace What:="\", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveWindow.SmallScroll Down:=-3
Windows("qty.xls").Activate
ActiveWindow.SmallScroll Down:=-12
Range("M2").Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-9],lots.xlsx!R2C2:R100C16,15,0)"
Range("M2").Select
Selection.Copy
Range("N2").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=RC[-1]*RC[-6]"
Range("M2:N2").Select
Selection.Copy
Range("M2:N100").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=-12
End Sub