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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -