Sub Addrows()
Dim lastrow as Long, i as Long
lastrow = cells(rows.count,"F").end(xlup).row
for i = lastrow to 2 step -1
if instr(1,cells(i,"F"),"Total",vbTextCompare) then
rows(i).Insert
end if
Next
End sub
Sub Addrows()
Dim lastrow as Long, i as Long
lastrow = cells(rows.count,"F").end(xlup).row
for i = lastrow to 2 step -1
if instr(1,cells(i,"F"),"Total",vbTextCompare) then
rows(i + 1).Insert
end if
Next
End sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.