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

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -