Hi all,
I have a worksheet that I set up with 47 tables I need to be able to insert a row above the last line of each of table and copy formulas, cond. form. but not values. I have a code but excel has to reference it 47 times and in turn it takes for ever to complete and it copies cell format but not formulas and Cond. Form. ....I was curious if there is an easier way? I am very new to VBA.....thanks in advance for any help.
here is the macro code I have assigned to a button
Sub Insert Row()
ThisWorkbook.Sheets("Sheet1").Range("Table1").Select
Rows(Selection.Row).Insert shift:=xlDown
this is repeated 46 times in the sub range.
ThisWorkbook.Sheets("Sheet1").Range("Table47").Select
Rows(Selection.Row).Insert shift:=xlDown
End Sub
I have a worksheet that I set up with 47 tables I need to be able to insert a row above the last line of each of table and copy formulas, cond. form. but not values. I have a code but excel has to reference it 47 times and in turn it takes for ever to complete and it copies cell format but not formulas and Cond. Form. ....I was curious if there is an easier way? I am very new to VBA.....thanks in advance for any help.
here is the macro code I have assigned to a button
Sub Insert Row()
ThisWorkbook.Sheets("Sheet1").Range("Table1").Select
Rows(Selection.Row).Insert shift:=xlDown
this is repeated 46 times in the sub range.
ThisWorkbook.Sheets("Sheet1").Range("Table47").Select
Rows(Selection.Row).Insert shift:=xlDown
End Sub