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
Post a Comment