Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Columnwidth | Excel Discussion (Misc queries) | |||
How do I reset the columnwidth to sheet-default? | Excel Discussion (Misc queries) | |||
Autofit Merged cell Code is changing the format of my merged cells | Excel Discussion (Misc queries) | |||
how do i link merged cells to a merged cell in another worksheet. | Excel Worksheet Functions | |||
Sorting merged cellsHow do I sort merged cells not identically siz | Excel Worksheet Functions |