keeping cell formatting

  • Thread starter Thread starter Aladd1n
  • Start date Start date
A

Aladd1n

Hello,

I have formatted an excel spreadsheet (changed cell widths and height
etc...)

I would like to retain this formatting when i copy this spreadsheet t
other sheets. How can I do this?

As it is now, I have to change each cell manually each time I copy th
spreadsheet template to another sheet.

Thanks in advance
aladdi
 
I just experimented with this and as far as I can tell, Width is attached to the column and height attached to the row. So, if you want to copy and paste data and maitain cell width and height, you may have to select whole rows and columns
If I select columns, then column width survives the copy and paste. Same with row height. If I copy and paste the whole sheet, both height and width are preserved
Macro solutions could also help--here's a couple things you could try
Make sure the cells are selected for this method--If you always need an exact height and width for cells, here's one way to do it (just substitue the numbers you need for 12 and 18)

Sub ConstantHeightWidth(

With selection.Selec
selection.ColumnWidth = 1
selection.RowHeight = 1
End Wit
End Su

If you find that you are constantly altering row height and column width to different values, you can use the following macro after you copy and past--as long as you still have the cells selected. It will ask you to type the width and height you require

Sub ChangeWidthandHeight(

Dim iptresult1 As Strin
Dim iptresult2 As Strin

With selection.Selec
iptresult1 = InputBox("Type Column Width"
selection.ColumnWidth = iptresult
iptresult2 = InputBox("Type Row Height"
selection.RowHeight = iptresult
End Wit
End Su

t
 
Back
Top