Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Column Width Template Question

I currently have a report that I export into Excel. The name of the Column is
Company Name. Sometimes the names are small and sometimes big. But the Column
Width always needs to stay at 50 characters wide. So if the name is only 10
characters wide, I still need the remaining 40 to show up in the column.
Since I export this every month, I would like to export this report into a
template that will give me the column size I need.

Is there a way to do this.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Column Width Template Question

Columnwidths aren't measured in characters.

=rept("i",50)
is much skinnier than
=rept("W",50)
(in a non-proportional font)

If you use a proportional font (like Courier New), then they would be.)

I think I'd set the width manually or use a macro to make it exactly as wide as
I needed.

Set the width manually and then
Format|Column|width to see the current width that you need to use in the macro.

metaltecks wrote:

I currently have a report that I export into Excel. The name of the Column is
Company Name. Sometimes the names are small and sometimes big. But the Column
Width always needs to stay at 50 characters wide. So if the name is only 10
characters wide, I still need the remaining 40 to show up in the column.
Since I export this every month, I would like to export this report into a
template that will give me the column size I need.

Is there a way to do this.

Thank you


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Column Width Template Question

I can do this, but my problem is when i click on the column heading to get
rid of the white space, it does. I don't want it to. I want the cells to be
locked with that width.
How can I do that?
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Column Width Template Question

Not if you autofit the columns.

Maybe you could create a macro that autofits all the columns and comes back and
fixes that other column.

Something like:

Option Explicit
Sub testme()
With ActiveSheet
.UsedRange.Columns.AutoFit
.Range("c1").EntireColumn.ColumnWidth = 44
End With
End Sub

=====
Or put the longest name possible (or all x's or whatever) in a cell in that
column. Then hide that row.

Then autofitting of that column should respect that (hidden) cell's length.



metaltecks wrote:

I can do this, but my problem is when i click on the column heading to get
rid of the white space, it does. I don't want it to. I want the cells to be
locked with that width.
How can I do that?


--

Dave Peterson
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
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
A new twist to the validation drop-down width question. Spongebob Excel Discussion (Misc queries) 2 May 26th 05 09:12 PM
2 Question: Coloumn width, Filename nopfusch Excel Worksheet Functions 2 March 15th 05 07:43 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:47 PM.

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"