excel - Add a new row with data -


how can add new row excel sheet using macro data, i've search , find add new 'blank' row, , that's not need

i want when execute macro, create row content in cells, like:

cell 1 | cell 2 | cell 3 | userid username user last name

the information hardcoded formulas or simple hardcoded data want every time macro runs rows created information.

say want insert data @ row i. can this:

myworksheet.rows(i).insert myworksheet.range("a" & i).value = userid myworksheet.range("b" & i).value = username myworksheet.range("c" & i).value = userlastname ' etc... 

if want have new row copy of row above (usually useful when wanting repeat formulas), can this:

myworksheet.rows(i).insert myworksheet.rows(i-1).copy myworksheet.rows(i) 

Comments

Popular posts from this blog

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

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

android - How to create dynamically Fragment pager adapter -