wraptext is not updating when using references to another cell

  • Thread starter Thread starter Jurry
  • Start date Start date
J

Jurry

I'm facing the problem that wraptext is not working correctly as a
reference to another cell is used. This is demonstrated in the
following example:

A2 contains "xx"
A1 contains the formula "=A2"
wraptext is switched on for cell A1
A2 is chanced to the a content which exceeds the cell width for example
"123456789012345678901234567890"

Result: the wraptext function is not working. If wraptext is switched
off and then on again, it works again. Is there a way around this
problem (both office 2000 and XP are having it).

Thanks in advance!
 
I think WarpText only wraps text!

If it's OK to convert your number to text, try

="'" & A2

Regards,
Sandy
 
Also using for example "bchsdbcjhbcjhbvmbhmvbjbv" it gives the sam
problem.... :(


Sandy said:
I think WarpText only wraps text!

If it's OK to convert your number to text, try

="'" & A2

Regards,
Sand
 
Also using for example "bchsdbcjhbcjhbvmbhmvbjbv" it
gives the same problem.... :(

Strange. If my formula cell is formated with WrapText, and
references a cell containing text, it wraps fine for me.
If it references a cell containing a number then it does
not, without a fix as I suggested.

Regards,
Sandy
Sandy said:
I think WarpText only wraps text!

If it's OK to convert your number to text, try

="'" & A2

Regards,
Sandy

 
It only misbehaves if first the text in A2 is shorter than the cell
subsequently autowrap is switched on and subsequently the text in A2 i
modified to make it longer than the cell.
If you start already with a text longer than the cell width, it behave
just fine. So could you please try the exact sequence as described i
the original post?

Thanks,
Jurry.

Sandy said:
*>Also using for example "bchsdbcjhbcjhbvmbhmvbjbv" it
gives the same problem.... :(

Strange. If my formula cell is formated with WrapText, and
references a cell containing text, it wraps fine for me.
If it references a cell containing a number then it does
not, without a fix as I suggested.

Regards,
Sandy
Sandy said:
I think WarpText only wraps text!

If it's OK to convert your number to text, try

="'" & A2

Regards,
Sandy

 
OK, I see what's happening. The cell remains wrapped, ie
text does not flow into the next cell (if empty). However
the row height does not immediately update. Try double-
click the row header mark.

Regards,
Sandy
-----Original Message-----
It only misbehaves if first the text in A2 is shorter than the cell,
subsequently autowrap is switched on and subsequently the text in A2 is
modified to make it longer than the cell.
If you start already with a text longer than the cell width, it behaves
just fine. So could you please try the exact sequence as described in
the original post?

Thanks,
Jurry.

Sandy said:
*>Also using for example "bchsdbcjhbcjhbvmbhmvbjbv" it
gives the same problem.... :(

Strange. If my formula cell is formated with WrapText, and
references a cell containing text, it wraps fine for me.
If it references a cell containing a number then it does
not, without a fix as I suggested.

Regards,
Sandy
Sandy said:
I think WarpText only wraps text!

If it's OK to convert your number to text, try

="'" & A2

Regards,
Sandy
*

 
Ok, that works. The only problem is now how to program it in VBA: I hav
an order sheet in which (200) cells, off which the content is entere
by the user, has to be copied to another cell (which has the wraptex
activated) in real time. Letting the user constantly doubleclick th
row header is not really an option. Any clue how to program that i
Excel?

Thanks,
Jurry
 
From the macro recorder:

Rows("1:1").EntireRow.AutoFit

You probably won't need the following .select line that
gets recorded. Could include this in an an event macro.
Right click the sheet tab / View code and paste following:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Rows(Target.Row).EntireRow.AutoFit
End Sub

Regards,
Sandy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top