ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   edit Excel template (https://www.excelbanter.com/new-users-excel/228695-edit-excel-template.html)

CB

edit Excel template
 
I have an existing template that was passed down to me from the previous
person working my job.

My problem is that I need to modify it.
How do I do this?

One of the items I want to be able to do is to automatically insert blank
rows, and I have no idea how to accomplish this.

Any ideas?

AltaEgo

edit Excel template
 
1) Copy the .xlt file (so you retain the original as backup)
2) Rename the file extension .xls
3) Make your changes
4) Save As YourFileName.xlt

How you insert your row depends what problem you need to solve. Some
examples follow.

This is a recorded macro that always selects row 3 and inserts a row:

Sub Macro1()
Rows("3:3").Select
Selection.Insert Shift:=xlDown
End Sub

The following enables an action on an entire row based on a selected cell:

Sub InsertFromSingleSelection()

Range("A3").Select
'delete above line and it will work
'on the currently selected cell/s
' If selection covers cells in two rows
' two rows are inserted
Selection.EntireRow.Insert
End Sub


Sub InsertWithoutSelecting()
'use to insert row without first selecting
' a cell
Range("3:3").EntireRow.Insert
' or
'Range("A3").EntireRow.Insert
'will do the same
End Sub


NOTE: In the above, Selection.Insert Shift:=xlDown applies only to the
selection whilst Range("3:3").EntireRow.Insert applies to the whole row.

If the above confuses or you need further help, please ask.


HTH
--
Steve

"CB" wrote in message
...
I have an existing template that was passed down to me from the previous
person working my job.

My problem is that I need to modify it.
How do I do this?

One of the items I want to be able to do is to automatically insert blank
rows, and I have no idea how to accomplish this.

Any ideas?




All times are GMT +1. The time now is 06:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com