Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default width of Merged cells within un merged cells


Another one..
Assume cells e1,f1,g1 are merged (as are e2,f2,g2) up to e100
Same thing with cells in columns i,j,k
Cells in the inbetween columns are NOT merged.

I want to create a macro to size column width to 15 (each) of merged
cells in column e,f,g.
If I manually select the column in excel, I can do it.(ie click on the
column letter)
If I try to write basic VB to do (see below) it expands my column
selection to the entire data iin the sheet(cols a - k) and then applies
the column width to all of these columns (which I dont want)
Unfortunately I cant unmerge the cols

Any ideas???

Basic VB im using:

Columns("E:G").Select
Selection.ColumnWidth = 15


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default width of Merged cells within un merged cells

Darin,

Columns("E:G").ColumnWidth = 15

worked for me....

--
HTH,
Bernie
MS Excel MVP


"Darin Kramer" wrote in message
...

Another one..
Assume cells e1,f1,g1 are merged (as are e2,f2,g2) up to e100
Same thing with cells in columns i,j,k
Cells in the inbetween columns are NOT merged.

I want to create a macro to size column width to 15 (each) of merged
cells in column e,f,g.
If I manually select the column in excel, I can do it.(ie click on the
column letter)
If I try to write basic VB to do (see below) it expands my column
selection to the entire data iin the sheet(cols a - k) and then applies
the column width to all of these columns (which I dont want)
Unfortunately I cant unmerge the cols

Any ideas???

Basic VB im using:

Columns("E:G").Select
Selection.ColumnWidth = 15


*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default width of Merged cells within un merged cells


Thanks Bernie,

Works for me too now!


*** Sent via Developersdex http://www.developersdex.com ***
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
Autofit Merged cell Code is changing the format of my merged cells JB Excel Discussion (Misc queries) 0 August 20th 07 02:12 PM
Excel - Automate row width for merged cells with wrapped text Sweetiedaw Setting up and Configuration of Excel 0 September 7th 06 10:23 PM
how do i link merged cells to a merged cell in another worksheet. ibbm Excel Worksheet Functions 3 April 27th 06 11:40 PM
Merged cells width davegb Excel Programming 2 June 1st 05 10:03 PM
Sorting merged cellsHow do I sort merged cells not identically siz Laval Excel Worksheet Functions 1 November 3rd 04 09:40 PM


All times are GMT +1. The time now is 07:41 AM.

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

About Us

"It's about Microsoft Excel"