有没有更快的方法在excel中将一组字符串打印成一行?

时间:2017-07-25 18:18:40

标签: excel vba excel-vba

我的第一次传递涉及使用键盘快捷键来填充所选单元格及其行,使用" May"," Both"," Derek",[今天的日期],"上传"。它目前比打字更快,我希望它能像标准键盘快捷键一样快;我该如何清理它?

Sub AutofillBothMay()

    Application.ScreenUpdating = False

    ' Keyboard Shortcut: Ctrl+Shift+B

    ActiveCell = "MAY"
    ActiveCell.Offset(0, 1) = "BOTH"
    ActiveCell.Offset(0, 2) = "DEREK"
    ActiveCell.Offset(0, 3) = Date
    ActiveCell.Offset(0, 4) = "UPLOADED"
    Application.ScreenUpdating = True

End Sub

1 个答案:

答案 0 :(得分:2)

试一试,

activecell.resize(1, 6) = array("MAY", "BOTH", "DEREK", Date, "UPLOADED", True)

不要打扰Application.ScreenUpdating。