Merged cells won't Autofit row height


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions RSS
Next:  Using 2 IF statements for the same cell  
Author Message
Hpyifur
External


Since: Jan 12, 2007
Posts: 2



PostPosted: Fri Jan 12, 2007 9:10 am    Post subject: Merged cells won't Autofit row height
Archived from groups: microsoft>public>excel>misc (more info?)

When I merge cells and then choose the wrap text option the Autofit function
no longer works. Is there a way to get around this without manually sizing
the row each time?
Back to top
RagDyer
External


Since: Jun 14, 2004
Posts: 762



PostPosted: Fri Jan 12, 2007 9:24 am    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

*Unmerge* the cells and then use "Center Across Selection" from:

<Format> <Cells. <Alignment> tab,
Expand the "Horizontal" window and choose "Center Across Selection".
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Hpyifur" <Hpyifur.TakeThisOut@discussions.microsoft.com> wrote in message
news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
> When I merge cells and then choose the wrap text option the Autofit
> function
> no longer works. Is there a way to get around this without manually
> sizing
> the row each time?
Back to top
Hpyifur
External


Since: Jan 12, 2007
Posts: 2



PostPosted: Fri Jan 12, 2007 9:42 am    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

RD - Thanks for your response.

My problem is that it's an area that needs to have information entered into
by other people (and could vary greatly as to the input). It has to be left
justified and is limited on how wide the merged area can be, that's why I was
looking to use the Wrap Text option.

Thanks
-----------------------------

"RagDyer" wrote:

> *Unmerge* the cells and then use "Center Across Selection" from:
>
> <Format> <Cells. <Alignment> tab,
> Expand the "Horizontal" window and choose "Center Across Selection".
> --
> HTH,
>
> RD
>
> ---------------------------------------------------------------------------
> Please keep all correspondence within the NewsGroup, so all may benefit !
> ---------------------------------------------------------------------------
> "Hpyifur" <Hpyifur RemoveThis @discussions.microsoft.com> wrote in message
> news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
> > When I merge cells and then choose the wrap text option the Autofit
> > function
> > no longer works. Is there a way to get around this without manually
> > sizing
> > the row each time?
>
>
Back to top
Gord Dibben
External


Since: Feb 23, 2004
Posts: 8800



PostPosted: Fri Jan 12, 2007 10:38 am    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Long audible sigh here.................

One more victim of "merged cells".

Wrap Text works fine on merged cells, but Autofit does not work.

You need VBA code to do that.

Here is code from Greg Wilson.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range

With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
Application.ScreenUpdating = True
End If
End With
End Sub


Gord Dibben MS Excel MVP

On Fri, 12 Jan 2007 09:42:00 -0800, Hpyifur <Hpyifur DeleteThis @discussions.microsoft.com>
wrote:

>RD - Thanks for your response.
>
>My problem is that it's an area that needs to have information entered into
>by other people (and could vary greatly as to the input). It has to be left
>justified and is limited on how wide the merged area can be, that's why I was
>looking to use the Wrap Text option.
>
>Thanks
>-----------------------------
>
>"RagDyer" wrote:
>
>> *Unmerge* the cells and then use "Center Across Selection" from:
>>
>> <Format> <Cells. <Alignment> tab,
>> Expand the "Horizontal" window and choose "Center Across Selection".
>> --
>> HTH,
>>
>> RD
>>
>> ---------------------------------------------------------------------------
>> Please keep all correspondence within the NewsGroup, so all may benefit !
>> ---------------------------------------------------------------------------
>> "Hpyifur" <Hpyifur DeleteThis @discussions.microsoft.com> wrote in message
>> news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
>> > When I merge cells and then choose the wrap text option the Autofit
>> > function
>> > no longer works. Is there a way to get around this without manually
>> > sizing
>> > the row each time?
>>
>>
Back to top
Chris
External


Since: Apr 10, 2006
Posts: 375



PostPosted: Sun Mar 04, 2007 10:20 pm    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Gord
I to used you code, works great, however not if I protected document. Any
suggestions?
--
Regards


"Gord Dibben" wrote:

> Long audible sigh here.................
>
> One more victim of "merged cells".
>
> Wrap Text works fine on merged cells, but Autofit does not work.
>
> You need VBA code to do that.
>
> Here is code from Greg Wilson.
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> Dim NewRwHt As Single
> Dim cWdth As Single, MrgeWdth As Single
> Dim c As Range, cc As Range
> Dim ma As Range
>
> With Target
> If .MergeCells And .WrapText Then
> Set c = Target.Cells(1, 1)
> cWdth = c.ColumnWidth
> Set ma = c.MergeArea
> For Each cc In ma.Cells
> MrgeWdth = MrgeWdth + cc.ColumnWidth
> Next
> Application.ScreenUpdating = False
> ma.MergeCells = False
> c.ColumnWidth = MrgeWdth
> c.EntireRow.AutoFit
> NewRwHt = c.RowHeight
> c.ColumnWidth = cWdth
> ma.MergeCells = True
> ma.RowHeight = NewRwHt
> cWdth = 0: MrgeWdth = 0
> Application.ScreenUpdating = True
> End If
> End With
> End Sub
>
>
> Gord Dibben MS Excel MVP
>
> On Fri, 12 Jan 2007 09:42:00 -0800, Hpyifur <Hpyifur.TakeThisOut@discussions.microsoft.com>
> wrote:
>
> >RD - Thanks for your response.
> >
> >My problem is that it's an area that needs to have information entered into
> >by other people (and could vary greatly as to the input). It has to be left
> >justified and is limited on how wide the merged area can be, that's why I was
> >looking to use the Wrap Text option.
> >
> >Thanks
> >-----------------------------
> >
> >"RagDyer" wrote:
> >
> >> *Unmerge* the cells and then use "Center Across Selection" from:
> >>
> >> <Format> <Cells. <Alignment> tab,
> >> Expand the "Horizontal" window and choose "Center Across Selection".
> >> --
> >> HTH,
> >>
> >> RD
> >>
> >> ---------------------------------------------------------------------------
> >> Please keep all correspondence within the NewsGroup, so all may benefit !
> >> ---------------------------------------------------------------------------
> >> "Hpyifur" <Hpyifur.TakeThisOut@discussions.microsoft.com> wrote in message
> >> news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
> >> > When I merge cells and then choose the wrap text option the Autofit
> >> > function
> >> > no longer works. Is there a way to get around this without manually
> >> > sizing
> >> > the row each time?
> >>
> >>
>
>
Back to top
Greg Wilson
External


Since: Apr 16, 2006
Posts: 89



PostPosted: Sun Mar 04, 2007 11:16 pm    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In place of the word "password" you would hard code your password and remove
the leading apostrophe assuming it's password protected. Otherwise ignore it.
Minimal testing:-

Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range
Dim ProtectStatus As Boolean

With Target
If .MergeCells And .WrapText Then
ProtectStatus = Me.ProtectContents
If ProtectStatus Then Me.Unprotect ' "password"
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
MrgeWdth = MrgeWdth + cc.ColumnWidth
Next
Application.ScreenUpdating = False
On Error Resume Next
ma.MergeCells = False
c.ColumnWidth = MrgeWdth
c.EntireRow.AutoFit
NewRwHt = c.RowHeight
c.ColumnWidth = cWdth
ma.MergeCells = True
ma.RowHeight = NewRwHt
cWdth = 0: MrgeWdth = 0
On Error GoTo 0
Application.ScreenUpdating = True
If ProtectStatus Then Me.Protect ' "password"
End If
End With
End Sub

Regards,
Greg




"Chris" wrote:

> Gord
> I to used you code, works great, however not if I protected document. Any
> suggestions?
> --
> Regards
>
>
> "Gord Dibben" wrote:
>
> > Long audible sigh here.................
> >
> > One more victim of "merged cells".
> >
> > Wrap Text works fine on merged cells, but Autofit does not work.
> >
> > You need VBA code to do that.
> >
> > Here is code from Greg Wilson.
> >
> > Private Sub Worksheet_Change(ByVal Target As Range)
> > Dim NewRwHt As Single
> > Dim cWdth As Single, MrgeWdth As Single
> > Dim c As Range, cc As Range
> > Dim ma As Range
> >
> > With Target
> > If .MergeCells And .WrapText Then
> > Set c = Target.Cells(1, 1)
> > cWdth = c.ColumnWidth
> > Set ma = c.MergeArea
> > For Each cc In ma.Cells
> > MrgeWdth = MrgeWdth + cc.ColumnWidth
> > Next
> > Application.ScreenUpdating = False
> > ma.MergeCells = False
> > c.ColumnWidth = MrgeWdth
> > c.EntireRow.AutoFit
> > NewRwHt = c.RowHeight
> > c.ColumnWidth = cWdth
> > ma.MergeCells = True
> > ma.RowHeight = NewRwHt
> > cWdth = 0: MrgeWdth = 0
> > Application.ScreenUpdating = True
> > End If
> > End With
> > End Sub
> >
> >
> > Gord Dibben MS Excel MVP
> >
> > On Fri, 12 Jan 2007 09:42:00 -0800, Hpyifur <Hpyifur DeleteThis @discussions.microsoft.com>
> > wrote:
> >
> > >RD - Thanks for your response.
> > >
> > >My problem is that it's an area that needs to have information entered into
> > >by other people (and could vary greatly as to the input). It has to be left
> > >justified and is limited on how wide the merged area can be, that's why I was
> > >looking to use the Wrap Text option.
> > >
> > >Thanks
> > >-----------------------------
> > >
> > >"RagDyer" wrote:
> > >
> > >> *Unmerge* the cells and then use "Center Across Selection" from:
> > >>
> > >> <Format> <Cells. <Alignment> tab,
> > >> Expand the "Horizontal" window and choose "Center Across Selection".
> > >> --
> > >> HTH,
> > >>
> > >> RD
> > >>
> > >> ---------------------------------------------------------------------------
> > >> Please keep all correspondence within the NewsGroup, so all may benefit !
> > >> ---------------------------------------------------------------------------
> > >> "Hpyifur" <Hpyifur DeleteThis @discussions.microsoft.com> wrote in message
> > >> news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
> > >> > When I merge cells and then choose the wrap text option the Autofit
> > >> > function
> > >> > no longer works. Is there a way to get around this without manually
> > >> > sizing
> > >> > the row each time?
> > >>
> > >>
> >
> >
Back to top
Odie
External


Since: Mar 01, 2007
Posts: 5



PostPosted: Thu Jun 28, 2007 8:02 am    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Is there any solution for this problem without the use of code?

"Gord Dibben" wrote:

> Long audible sigh here.................
>
> One more victim of "merged cells".
>
> Wrap Text works fine on merged cells, but Autofit does not work.
>
> You need VBA code to do that.
>
> Here is code from Greg Wilson.
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> Dim NewRwHt As Single
> Dim cWdth As Single, MrgeWdth As Single
> Dim c As Range, cc As Range
> Dim ma As Range
>
> With Target
> If .MergeCells And .WrapText Then
> Set c = Target.Cells(1, 1)
> cWdth = c.ColumnWidth
> Set ma = c.MergeArea
> For Each cc In ma.Cells
> MrgeWdth = MrgeWdth + cc.ColumnWidth
> Next
> Application.ScreenUpdating = False
> ma.MergeCells = False
> c.ColumnWidth = MrgeWdth
> c.EntireRow.AutoFit
> NewRwHt = c.RowHeight
> c.ColumnWidth = cWdth
> ma.MergeCells = True
> ma.RowHeight = NewRwHt
> cWdth = 0: MrgeWdth = 0
> Application.ScreenUpdating = True
> End If
> End With
> End Sub
>
>
> Gord Dibben MS Excel MVP
>
> On Fri, 12 Jan 2007 09:42:00 -0800, Hpyifur <Hpyifur.RemoveThis@discussions.microsoft.com>
> wrote:
>
> >RD - Thanks for your response.
> >
> >My problem is that it's an area that needs to have information entered into
> >by other people (and could vary greatly as to the input). It has to be left
> >justified and is limited on how wide the merged area can be, that's why I was
> >looking to use the Wrap Text option.
> >
> >Thanks
> >-----------------------------
> >
> >"RagDyer" wrote:
> >
> >> *Unmerge* the cells and then use "Center Across Selection" from:
> >>
> >> <Format> <Cells. <Alignment> tab,
> >> Expand the "Horizontal" window and choose "Center Across Selection".
> >> --
> >> HTH,
> >>
> >> RD
> >>
> >> ---------------------------------------------------------------------------
> >> Please keep all correspondence within the NewsGroup, so all may benefit !
> >> ---------------------------------------------------------------------------
> >> "Hpyifur" <Hpyifur.RemoveThis@discussions.microsoft.com> wrote in message
> >> news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
> >> > When I merge cells and then choose the wrap text option the Autofit
> >> > function
> >> > no longer works. Is there a way to get around this without manually
> >> > sizing
> >> > the row each time?
> >>
> >>
>
>
Back to top
Dave Peterson
External


Since: Jul 08, 2005
Posts: 15610



PostPosted: Thu Jun 28, 2007 10:26 am    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Adjust the rowheight manually????

Odie wrote:
>
> Is there any solution for this problem without the use of code?
>
> "Gord Dibben" wrote:
>
> > Long audible sigh here.................
> >
> > One more victim of "merged cells".
> >
> > Wrap Text works fine on merged cells, but Autofit does not work.
> >
> > You need VBA code to do that.
> >
> > Here is code from Greg Wilson.
> >
> > Private Sub Worksheet_Change(ByVal Target As Range)
> > Dim NewRwHt As Single
> > Dim cWdth As Single, MrgeWdth As Single
> > Dim c As Range, cc As Range
> > Dim ma As Range
> >
> > With Target
> > If .MergeCells And .WrapText Then
> > Set c = Target.Cells(1, 1)
> > cWdth = c.ColumnWidth
> > Set ma = c.MergeArea
> > For Each cc In ma.Cells
> > MrgeWdth = MrgeWdth + cc.ColumnWidth
> > Next
> > Application.ScreenUpdating = False
> > ma.MergeCells = False
> > c.ColumnWidth = MrgeWdth
> > c.EntireRow.AutoFit
> > NewRwHt = c.RowHeight
> > c.ColumnWidth = cWdth
> > ma.MergeCells = True
> > ma.RowHeight = NewRwHt
> > cWdth = 0: MrgeWdth = 0
> > Application.ScreenUpdating = True
> > End If
> > End With
> > End Sub
> >
> >
> > Gord Dibben MS Excel MVP
> >
> > On Fri, 12 Jan 2007 09:42:00 -0800, Hpyifur <Hpyifur.TakeThisOut@discussions.microsoft.com>
> > wrote:
> >
> > >RD - Thanks for your response.
> > >
> > >My problem is that it's an area that needs to have information entered into
> > >by other people (and could vary greatly as to the input). It has to be left
> > >justified and is limited on how wide the merged area can be, that's why I was
> > >looking to use the Wrap Text option.
> > >
> > >Thanks
> > >-----------------------------
> > >
> > >"RagDyer" wrote:
> > >
> > >> *Unmerge* the cells and then use "Center Across Selection" from:
> > >>
> > >> <Format> <Cells. <Alignment> tab,
> > >> Expand the "Horizontal" window and choose "Center Across Selection".
> > >> --
> > >> HTH,
> > >>
> > >> RD
> > >>
> > >> ---------------------------------------------------------------------------
> > >> Please keep all correspondence within the NewsGroup, so all may benefit !
> > >> ---------------------------------------------------------------------------
> > >> "Hpyifur" <Hpyifur.TakeThisOut@discussions.microsoft.com> wrote in message
> > >> news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
> > >> > When I merge cells and then choose the wrap text option the Autofit
> > >> > function
> > >> > no longer works. Is there a way to get around this without manually
> > >> > sizing
> > >> > the row each time?
> > >>
> > >>
> >
> >

--

Dave Peterson
Back to top
Odie
External


Since: Mar 01, 2007
Posts: 5



PostPosted: Thu Jun 28, 2007 10:26 am    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Dave, thanks. I guess I should have been more specific.

Is there anyway to make the autofit work with merged cells (other than using
code)? I have a form that is used over and over, so it's a pain to keep
manually adjusting (plus the screen view is different than print view, so it
means lots of switching back and forth).

Another work around that doesn't solve the underlying problem is to redesign
the form.

"Dave Peterson" wrote:

> Adjust the rowheight manually????
>
> Odie wrote:
> >
> > Is there any solution for this problem without the use of code?
> >
> > "Gord Dibben" wrote:
> >
> > > Long audible sigh here.................
> > >
> > > One more victim of "merged cells".
> > >
> > > Wrap Text works fine on merged cells, but Autofit does not work.
> > >
> > > You need VBA code to do that.
> > >
> > > Here is code from Greg Wilson.
> > >
> > > Private Sub Worksheet_Change(ByVal Target As Range)
> > > Dim NewRwHt As Single
> > > Dim cWdth As Single, MrgeWdth As Single
> > > Dim c As Range, cc As Range
> > > Dim ma As Range
> > >
> > > With Target
> > > If .MergeCells And .WrapText Then
> > > Set c = Target.Cells(1, 1)
> > > cWdth = c.ColumnWidth
> > > Set ma = c.MergeArea
> > > For Each cc In ma.Cells
> > > MrgeWdth = MrgeWdth + cc.ColumnWidth
> > > Next
> > > Application.ScreenUpdating = False
> > > ma.MergeCells = False
> > > c.ColumnWidth = MrgeWdth
> > > c.EntireRow.AutoFit
> > > NewRwHt = c.RowHeight
> > > c.ColumnWidth = cWdth
> > > ma.MergeCells = True
> > > ma.RowHeight = NewRwHt
> > > cWdth = 0: MrgeWdth = 0
> > > Application.ScreenUpdating = True
> > > End If
> > > End With
> > > End Sub
> > >
> > >
> > > Gord Dibben MS Excel MVP
> > >
> > > On Fri, 12 Jan 2007 09:42:00 -0800, Hpyifur <Hpyifur.RemoveThis@discussions.microsoft.com>
> > > wrote:
> > >
> > > >RD - Thanks for your response.
> > > >
> > > >My problem is that it's an area that needs to have information entered into
> > > >by other people (and could vary greatly as to the input). It has to be left
> > > >justified and is limited on how wide the merged area can be, that's why I was
> > > >looking to use the Wrap Text option.
> > > >
> > > >Thanks
> > > >-----------------------------
> > > >
> > > >"RagDyer" wrote:
> > > >
> > > >> *Unmerge* the cells and then use "Center Across Selection" from:
> > > >>
> > > >> <Format> <Cells. <Alignment> tab,
> > > >> Expand the "Horizontal" window and choose "Center Across Selection".
> > > >> --
> > > >> HTH,
> > > >>
> > > >> RD
> > > >>
> > > >> ---------------------------------------------------------------------------
> > > >> Please keep all correspondence within the NewsGroup, so all may benefit !
> > > >> ---------------------------------------------------------------------------
> > > >> "Hpyifur" <Hpyifur.RemoveThis@discussions.microsoft.com> wrote in message
> > > >> news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
> > > >> > When I merge cells and then choose the wrap text option the Autofit
> > > >> > function
> > > >> > no longer works. Is there a way to get around this without manually
> > > >> > sizing
> > > >> > the row each time?
> > > >>
> > > >>
> > >
> > >
>
> --
>
> Dave Peterson
>
Back to top
Gord Dibben
External


Since: Feb 23, 2004
Posts: 8800



PostPosted: Thu Jun 28, 2007 10:26 am    Post subject: Re: Merged cells won't Autofit row height [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You were quite specific as was Dave's answer.

Without code you must manually adjust the heights.

Blow away those merged cells and forget that feature exists to make life much
simpler.


Gord Dibben MS Excel MVP

On Thu, 28 Jun 2007 09:02:02 -0700, Odie <Odie.TakeThisOut@discussions.microsoft.com> wrote:

>Dave, thanks. I guess I should have been more specific.
>
>Is there anyway to make the autofit work with merged cells (other than using
>code)? I have a form that is used over and over, so it's a pain to keep
>manually adjusting (plus the screen view is different than print view, so it
>means lots of switching back and forth).
>
>Another work around that doesn't solve the underlying problem is to redesign
>the form.
>
>"Dave Peterson" wrote:
>
>> Adjust the rowheight manually????
>>
>> Odie wrote:
>> >
>> > Is there any solution for this problem without the use of code?
>> >
>> > "Gord Dibben" wrote:
>> >
>> > > Long audible sigh here.................
>> > >
>> > > One more victim of "merged cells".
>> > >
>> > > Wrap Text works fine on merged cells, but Autofit does not work.
>> > >
>> > > You need VBA code to do that.
>> > >
>> > > Here is code from Greg Wilson.
>> > >
>> > > Private Sub Worksheet_Change(ByVal Target As Range)
>> > > Dim NewRwHt As Single
>> > > Dim cWdth As Single, MrgeWdth As Single
>> > > Dim c As Range, cc As Range
>> > > Dim ma As Range
>> > >
>> > > With Target
>> > > If .MergeCells And .WrapText Then
>> > > Set c = Target.Cells(1, 1)
>> > > cWdth = c.ColumnWidth
>> > > Set ma = c.MergeArea
>> > > For Each cc In ma.Cells
>> > > MrgeWdth = MrgeWdth + cc.ColumnWidth
>> > > Next
>> > > Application.ScreenUpdating = False
>> > > ma.MergeCells = False
>> > > c.ColumnWidth = MrgeWdth
>> > > c.EntireRow.AutoFit
>> > > NewRwHt = c.RowHeight
>> > > c.ColumnWidth = cWdth
>> > > ma.MergeCells = True
>> > > ma.RowHeight = NewRwHt
>> > > cWdth = 0: MrgeWdth = 0
>> > > Application.ScreenUpdating = True
>> > > End If
>> > > End With
>> > > End Sub
>> > >
>> > >
>> > > Gord Dibben MS Excel MVP
>> > >
>> > > On Fri, 12 Jan 2007 09:42:00 -0800, Hpyifur <Hpyifur.TakeThisOut@discussions.microsoft.com>
>> > > wrote:
>> > >
>> > > >RD - Thanks for your response.
>> > > >
>> > > >My problem is that it's an area that needs to have information entered into
>> > > >by other people (and could vary greatly as to the input). It has to be left
>> > > >justified and is limited on how wide the merged area can be, that's why I was
>> > > >looking to use the Wrap Text option.
>> > > >
>> > > >Thanks
>> > > >-----------------------------
>> > > >
>> > > >"RagDyer" wrote:
>> > > >
>> > > >> *Unmerge* the cells and then use "Center Across Selection" from:
>> > > >>
>> > > >> <Format> <Cells. <Alignment> tab,
>> > > >> Expand the "Horizontal" window and choose "Center Across Selection".
>> > > >> --
>> > > >> HTH,
>> > > >>
>> > > >> RD
>> > > >>
>> > > >> ---------------------------------------------------------------------------
>> > > >> Please keep all correspondence within the NewsGroup, so all may benefit !
>> > > >> ---------------------------------------------------------------------------
>> > > >> "Hpyifur" <Hpyifur.TakeThisOut@discussions.microsoft.com> wrote in message
>> > > >> news:0518FECC-94CC-40B2-ACEF-1919895A5399@microsoft.com...
>> > > >> > When I merge cells and then choose the wrap text option the Autofit
>> > > >> > function
>> > > >> > no longer works. Is there a way to get around this without manually
>> > > >> > sizing
>> > > >> > the row each time?
>> > > >>
>> > > >>
>> > >
>> > >
>>
>> --
>>
>> Dave Peterson
>>
Back to top
bf



Joined: Oct 25, 2007
Posts: 1



PostPosted: Thu Oct 25, 2007 11:34 am    Post subject: Worksheet code [Login to view extended thread Info.]

Thanks for the info on the code. I am having trouble to get the code to work properly, any ideas? I pasted it into the worksheet where I need the autofit code to work, but with no success.

What triggers the code to work? The merging of the cells, the autofit process???
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum