View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Howard Kaikow Howard Kaikow is offline
external usenet poster
 
Posts: 269
Default RowHeight and AutoFit wit Merged Cells

"Peter T" <peter_t@discussions wrote in message
...
Actually the logic is not straightforward if you need to deal with
mergearea's that contain both multiple columns and rows.


The code explicitly limits itself to 1 row,

That aside, the
code you posted could be improved though only to small effect compared

with
what will always be the reletively slow step of re-merging. However your
code as posted fails to do that, unless I understand the purpose I assume
that's an oversite.


I do not understand the above comment.

I did try your function and in my (I guess) equally old system it took an
eyeblink. If it took a second in yours there's something else going on.


Mine is really 10 years old, Pentium II 400 mhz.

Hmmm, I wonder if the AV software is interfering.
After I get off the internet, I'll disable the AV and see what happens.

If you have many potential mergeareas to autofit it would be very
significantly faster to process on another sheet and not need to do
re-merge's at all.


I had thought about doing that.

Here's an example that gives you the option to do it both
ways, note the process is an entire row at a time. Watch out wrap'd code


At this time, I am not processing a row at a time, rather 2 merged cells at
a time.
I may process a row at a time after I decide the final layout of the cells.