Excel VBA PasteSpecial -
set copysheet = worksheets("metrics") set pastesheet = worksheets("metrics") copysheet.range("a1:j5").copy pastesheet.cells(rows.count, 1).end(xlup).offset(2, 0).pastespecial xlpastevalues application.cutcopymode = false application.screenupdating = true
i have written chunk of vba code , want do, cannot figure out how apply second pastespecial formats copied section newly pasted section. tried adding second .pastespecial xlpasteformats under first pastespecial line, macro fails @ point.
any ideas how format newly pasted section?
it's not pretty answer,
pastesheet.cells(rows.count, 1).end(xlup).offset(-4, 0).pastespecial xlpasteformats
that end working. put right below first pastesheet line.
now have insert month of year in first cell after pasting... fun.
Comments
Post a Comment