Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Columnwidth of a merged cell

Hi,

does anyone know how I can determin the columnwidth of a merged cell.

There is a problem: I don't know if the cell is merged by the user and how
many cells are merged but I do know which cell is the possibly first cell of
the merge.

eg. I know cell [D5] is the first cell, so that columnwidth is certainly a
part of the total width. It is now possible (not certain) that the user
merges [E5:G5] with cell [D5]. When I check the width of [D5], I only get
the width of [D5], not the width of [D5:G5]

If [D5] is not merged with other cells, I only want the width of [D5], if it
is merged with [E5:Q5], I want the total width of [D5:Q5]

There is, afaik, no command like .merged which tells me if a cell is
included in a merged cell.

Thanks for your reply!

Jos Vens


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default Columnwidth of a merged cell

Jos,

Try using

Range("D5").MergeArea.Width

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jos Vens" wrote in message
...
Hi,

does anyone know how I can determin the columnwidth of a merged cell.

There is a problem: I don't know if the cell is merged by the user and how
many cells are merged but I do know which cell is the possibly first cell

of
the merge.

eg. I know cell [D5] is the first cell, so that columnwidth is certainly a
part of the total width. It is now possible (not certain) that the user
merges [E5:G5] with cell [D5]. When I check the width of [D5], I only get
the width of [D5], not the width of [D5:G5]

If [D5] is not merged with other cells, I only want the width of [D5], if

it
is merged with [E5:Q5], I want the total width of [D5:Q5]

There is, afaik, no command like .merged which tells me if a cell is
included in a merged cell.

Thanks for your reply!

Jos Vens




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Columnwidth of a merged cell

Thanks Bob,

this is exactly what I was looking for!

Jos

"Bob Phillips" schreef in bericht
...
Jos,

Try using

Range("D5").MergeArea.Width

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Jos Vens" wrote in message
...
Hi,

does anyone know how I can determin the columnwidth of a merged cell.

There is a problem: I don't know if the cell is merged by the user and

how
many cells are merged but I do know which cell is the possibly first

cell
of
the merge.

eg. I know cell [D5] is the first cell, so that columnwidth is certainly

a
part of the total width. It is now possible (not certain) that the user
merges [E5:G5] with cell [D5]. When I check the width of [D5], I only

get
the width of [D5], not the width of [D5:G5]

If [D5] is not merged with other cells, I only want the width of [D5],

if
it
is merged with [E5:Q5], I want the total width of [D5:Q5]

There is, afaik, no command like .merged which tells me if a cell is
included in a merged cell.

Thanks for your reply!

Jos Vens






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
Columnwidth Jean-Paul Excel Discussion (Misc queries) 1 November 24th 09 02:21 PM
How do I reset the columnwidth to sheet-default? schilleman Excel Discussion (Misc queries) 1 October 31st 07 09:06 AM
Autofit Merged cell Code is changing the format of my merged cells JB Excel Discussion (Misc queries) 0 August 20th 07 02:12 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
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 12:30 PM.

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"