自动汇总模板_0.5mg苯噻啶片.
自动汇总模板_0.5mg苯噻啶片.xlsm
Sub 按钮1_Click() Range("A1:G14").Value = Range("表1!A1:G14").Value Range("U3").Value = "=Right(表2!A3, 10)" Range("U4").Value = "=Right(表3!A3, 10)" Range("U5").Value = "=Right(表1!A3, 16)" Range("A3").Value = "=Left(表1!A3, 150)" Range("A3").Value = Range("A3").Value & "&" & Range("U5").Value & "&" & Range("U3").Value & "&" & Range("U4").Value Range("U3:U5").Value = "" '截图生产日期前 Range("A4").Value = "=Left(表1!A4, 13)" Range("U1").Value = "=Right(表1!A4, 10)" Range("U2").Value = "=Right(表1!A5, 7)" Range("U3").Value = "=Right(表2!A4, 10)" Range("U4").Value = "=Right(表2!A5, 7)" Range("U5").Value = "=Right(表3!A4, 10)" Range("U6").Value = "=Right(表3!A5, 7)" Range("A4").Value = Range("A4").Value & ":" & Range("U2").Value & ":" & Range("U1").Value & " " & Range("U4").Value & ":" & Range("U3").Value & " " & Range("U6").Value & ":" & Range("U5").Value Range("A5").Value = Range("A5").Value & " " & Range("U4").Value & " " & Range("U6").Value 'b11-13批号添加 Range("B11:B13").Value = Range("U2").Value & " " & Range("U4").Value & " " & Range("U6").Value Range("B14").Value = Range("表1!B14").Value & " " & Range("U2").Value Range("B15").Value = Range("表2!B14").Value & " " & Range("U4").Value Range("B16").Value = Range("表3!B14").Value & " " & Range("U6").Value Range("C14:G14").Value = Range("表1!C14:G14").Value Range("C15:G15").Value = Range("表2!C14:G14").Value Range("C16:G15").Value = Range("表3!C14:G14").Value '17 Range("A17").Value = Range("表1!A15").Value 'Range("B11:B13").Value = Range("U2").Value & " " & Range("U4").Value & " " & Range("U6").Value Range("B17").Value = Range("表1!B15").Value & " " & Range("U2").Value Range("B18").Value = Range("表2!B15").Value & " " & Range("U4").Value Range("B19").Value = Range("表3!B15").Value & " " & Range("U6").Value Range("C17:G17").Value = Range("表1!C15:G15").Value Range("C18:G18").Value = Range("表2!C15:G15").Value Range("C19:G19").Value = Range("表3!C15:G15").Value '20 Range("A20").Value = Range("表1!A16").Value 'Range("B11:B13").Value = Range("U2").Value & " " & Range("U4").Value & " " & Range("U6").Value Range("B20").Value = Range("表1!B16").Value & " " & Range("U2").Value Range("B21").Value = Range("表1!B17").Value & " " & Range("U2").Value Range("B22").Value = Range("表1!B18").Value & " " & Range("U2").Value Range("B23").Value = Range("表2!B16").Value & " " & Range("U4").Value Range("B24").Value = Range("表2!B17").Value & " " & Range("U4").Value Range("B25").Value = Range("表2!B18").Value & " " & Range("U4").Value Range("B26").Value = Range("表3!B16").Value & " " & Range("U6").Value Range("B27").Value = Range("表3!B17").Value & " " & Range("U6").Value Range("B28").Value = Range("表3!B18").Value & " " & Range("U6").Value Range("C20:G22").Value = Range("表1!C16:G18").Value Range("C23:G25").Value = Range("表2!C16:G18").Value Range("C26:G28").Value = Range("表3!C16:G18").Value '29-31 Range("A29").Value = Range("表1!A19").Value 'Range("B11:B13").Value = Range("U2").Value & " " & Range("U4").Value & " " & Range("U6").Value Range("B29").Value = Range("表1!B19").Value & " " & Range("U2").Value Range("B30").Value = Range("表2!B19").Value & " " & Range("U4").Value Range("B31").Value = Range("表3!B19").Value & " " & Range("U6").Value Range("C29:G29").Value = Range("表1!C19:G19").Value Range("C30:G30").Value = Range("表2!C19:G19").Value Range("C31:G31").Value = Range("表3!C19:G19").Value '32-34 Range("A32").Value = Range("表1!A20").Value 'Range("B11:B13").Value = Range("U2").Value & " " & Range("U4").Value & " " & Range("U6").Value Range("B32").Value = Range("表1!B20").Value & " " & Range("U2").Value Range("B33").Value = Range("表2!B20").Value & " " & Range("U4").Value Range("B34").Value = Range("表3!B20").Value & " " & Range("U6").Value Range("C32:G32").Value = Range("表1!C20:G20").Value Range("C33:G33").Value = Range("表2!C20:G20").Value Range("C34:G34").Value = Range("表3!C20:G20").Value '35 Range("A35").Value = Range("表1!A21").Value '36-37 Range("A36:G37").Value = Range("表1!A22:G23").Value Range("B36").Value = Range("B36").Value & " " & Range("U2").Value Range("B37").Value = Range("B37").Value & " " & Range("U2").Value '38-39 Range("A38:G39").Value = Range("表2!A22:G23").Value Range("B38").Value = Range("B38").Value & " " & Range("U4").Value Range("B39").Value = Range("B39").Value & " " & Range("U4").Value '40-41 Range("A40:G41").Value = Range("表3!A22:G23").Value Range("B40").Value = Range("B40").Value & " " & Range("U6").Value Range("B41").Value = Range("B41").Value & " " & Range("U6").Value '42 Range("A42").Value = Range("表1!A24").Value '43 Range("A43:G43").Value = Range("表1!A25:G25").Value Range("B43").Value = Range("B43").Value & " " & Range("U2").Value & " " & Range("U4").Value & " " & Range("U6").Value '44 Range("A44:G44").Value = Range("表1!A26:G26").Value Range("B44").Value = Range("B44").Value & " " & Range("U2").Value & " " & Range("U4").Value & " " & Range("U6").Value '45 Range("A45:G45").Value = Range("表1!A27:G27").Value Range("B45").Value = Range("U2").Value & " " & Range("U4").Value & " " & Range("U6").Value '46-52 Range("A46:G52").Value = Range("表1!A28:G34").Value Range("U1:U6").Value = "" 'Range("A3").Formula = Range("A3").Formula & aa 'Range("A3").Formula = Range("A3").Formula & Right("表2!A3", 10) End Sub