#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 114
Default column width

I have created a spreadsheet where every column has a different width. After
adjusting the width, I saved it. Every time I sort the spreadsheet, the
column width changes at will and I have to go through and adjust them again.
There is no pattern to it. They just change at random. What can I do to get
my adjustments to take?
--
Hazel
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default column width

Such as (?)...

Private Sub Worksheet_Activate()
Me.Columns("A:C").ColumnWidth = 10
Me.Columns("D").ColumnWidth = 5
Me.Columns("E").ColumnWidth = 25
Me.Columns("F").ColumnWidth = 50
Me.Columns("G:L").ColumnWidth = 3
End Sub

HTH

"Hazel" wrote:

I have created a spreadsheet where every column has a different width. After
adjusting the width, I saved it. Every time I sort the spreadsheet, the
column width changes at will and I have to go through and adjust them again.
There is no pattern to it. They just change at random. What can I do to get
my adjustments to take?
--
Hazel

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 114
Default column width

Jay--I appreciate your response (this is really driving me crazy!) But I
don't understand it.
--
Hazel


"JMay" wrote:

Such as (?)...

Private Sub Worksheet_Activate()
Me.Columns("A:C").ColumnWidth = 10
Me.Columns("D").ColumnWidth = 5
Me.Columns("E").ColumnWidth = 25
Me.Columns("F").ColumnWidth = 50
Me.Columns("G:L").ColumnWidth = 3
End Sub

HTH

"Hazel" wrote:

I have created a spreadsheet where every column has a different width. After
adjusting the width, I saved it. Every time I sort the spreadsheet, the
column width changes at will and I have to go through and adjust them again.
There is no pattern to it. They just change at random. What can I do to get
my adjustments to take?
--
Hazel

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default column width

Hi Hazel,
That was basically a macro.

now, if you don't know anhthing about macro's...i'll give you some idea to
use them.

open the excel sheet

now hit ALT+F11 (Function key f-11)

now on the left side you would see 3 worksheets ,
select a sheet where you want the code now after you select a sheet by
double clicking. Now after that you would see some are appearing on the right.

This is the place where you paste the code.

you can run the code by using the F5 key this time. and the code will
anyways runs everytime the worksheet is selected.

also regarding the code,

the line

Me.Columns("A:C").ColumnWidth = 10

mean to select columns a to c and set there width to 10 points.

the line

Me.Columns("D").ColumnWidth = 5

means to select only column d and set it's width to 5 point


alos, one important thing. please go to macro security and enable the macros
otherwise the code wouldnot run.


--
Kind Regards,
Satti Charvak
Only an Excel Enthusiast
Noida, India


"Hazel" wrote:

Jay--I appreciate your response (this is really driving me crazy!) But I
don't understand it.
--
Hazel


"JMay" wrote:

Such as (?)...

Private Sub Worksheet_Activate()
Me.Columns("A:C").ColumnWidth = 10
Me.Columns("D").ColumnWidth = 5
Me.Columns("E").ColumnWidth = 25
Me.Columns("F").ColumnWidth = 50
Me.Columns("G:L").ColumnWidth = 3
End Sub

HTH

"Hazel" wrote:

I have created a spreadsheet where every column has a different width. After
adjusting the width, I saved it. Every time I sort the spreadsheet, the
column width changes at will and I have to go through and adjust them again.
There is no pattern to it. They just change at random. What can I do to get
my adjustments to take?
--
Hazel

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Column Width Rob Excel Discussion (Misc queries) 0 December 12th 06 06:43 PM
how do I create multiple column width in the same column in excel Vish Excel Discussion (Misc queries) 9 November 3rd 06 11:49 PM
How to make cell width different than the column width it lies in John Excel Discussion (Misc queries) 2 September 11th 06 10:41 PM
Varying column width in a column chart Silvie Dedkova Charts and Charting in Excel 1 March 22nd 05 01:53 PM
Change the width of a single column in a column chart Dave Charts and Charting in Excel 2 December 13th 04 07:25 PM


All times are GMT +1. The time now is 11:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"