VB Add a blank row?
Is there an easy way to add a blank row after each sub-total in a spreadsheet
using VB? Thanks, Sandy |
VB Add a blank row?
assume the word Total in is column F
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 -- Regards, Tom Ogilvy "Sandy" wrote: Is there an easy way to add a blank row after each sub-total in a spreadsheet using VB? Thanks, Sandy |
All times are GMT +1. The time now is 08:59 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com