ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Column width (https://www.excelbanter.com/excel-worksheet-functions/77232-column-width.html)

JcR

Column width
 
In rows 1 through 10, I want my column width to be "20"

In rows 11 through 20, I want my column width to be "4"

How do I do this ?

Thanks


Gizmo63

Column width
 
No easy way my friend. You can't have different widths on different rows as
the sheet is a 'grid'.
In effect you'll have to create the impression of this layout by (a
suggestion anyway):
Set all your columns to 4 (Format - Columns - Set width)
Then in each of your rows 1 to 10 you'll have to merge the cells together in
blocks of 5 (5 x 4 = 20).
Can be done quickly by copy / paste. eq merge a1:e1, copy, paste into f1,
paste into k1 etc etc

HTH

Giz

"JcR" wrote:

In rows 1 through 10, I want my column width to be "20"

In rows 11 through 20, I want my column width to be "4"

How do I do this ?

Thanks


Don Guillett

Column width
 
manually
select the first columnhold shift keyselect last
columnformatcolumnwidth

in a macro

Sub setcolumnwidth()
Columns("a:j").ColumnWidth = 20
'or
'Range(Cells(1, 1), Cells(1, 10)).ColumnWidth = 20
End Sub
--
Don Guillett
SalesAid Software

"JcR" wrote in message
...
In rows 1 through 10, I want my column width to be "20"

In rows 11 through 20, I want my column width to be "4"

How do I do this ?

Thanks




JE McGimpsey

Column width
 
You can't - column width applies to the column, not individual cells.


You could make column A's column width 4, column B's column width 16,
and merge the A and B cells in row 1 through 10.

However, I don't recommend this as merged cells are the spawn of Satan,
and can make formatting, selections, etc. a real PITA. Just my personal
opinion, of course.

In article ,
JcR wrote:

In rows 1 through 10, I want my column width to be "20"

In rows 11 through 20, I want my column width to be "4"

How do I do this ?

Thanks


JE McGimpsey

Column width
 
That won't affect ROWS...

In article ,
"Don Guillett" wrote:

manually
select the first columnhold shift keyselect last
columnformatcolumnwidth

in a macro

Sub setcolumnwidth()
Columns("a:j").ColumnWidth = 20
'or
'Range(Cells(1, 1), Cells(1, 10)).ColumnWidth = 20
End Sub


Don Guillett

Column width
 
You are correct. I didn't read the post properly.

--
Don Guillett
SalesAid Software

"JE McGimpsey" wrote in message
...
That won't affect ROWS...

In article ,
"Don Guillett" wrote:

manually
select the first columnhold shift keyselect last
columnformatcolumnwidth

in a macro

Sub setcolumnwidth()
Columns("a:j").ColumnWidth = 20
'or
'Range(Cells(1, 1), Cells(1, 10)).ColumnWidth = 20
End Sub





All times are GMT +1. The time now is 08:32 PM.

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