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

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 -