ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   wraptext is not updating when using references to another cell (https://www.excelbanter.com/excel-programming/296049-wraptext-not-updating-when-using-references-another-cell.html)

Jurry

wraptext is not updating when using references to another cell
 
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!


---
Message posted from http://www.ExcelForum.com/


Sandy V[_6_]

wraptext is not updating when using references to another cell
 
I think WarpText only wraps text!

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

="'" & A2

Regards,
Sandy


-----Original Message-----
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!


---
Message posted from http://www.ExcelForum.com/

.


Jurry[_2_]

wraptext is not updating when using references to another cell
 
Also using for example "bchsdbcjhbcjhbvmbhmvbjbv" it gives the sam
problem.... :(


Sandy V wrote:
[b]I think WarpText only wraps text!

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

="'" & A2

Regards,
Sand


--
Message posted from http://www.ExcelForum.com


Sandy V[_6_]

wraptext is not updating when using references to another cell
 
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 V wrote:
[b]I think WarpText only wraps text!

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

="'" & A2

Regards,
Sandy



---
Message posted from http://www.ExcelForum.com/

.


Jurry[_3_]

wraptext is not updating when using references to another cell
 
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 V wrote:
*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 V wrote:
[b]I think WarpText only wraps text!

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

="'" & A2

Regards,
Sandy



---
Message posted from http://www.ExcelForum.com/

.


--
Message posted from http://www.ExcelForum.com


Sandy V[_6_]

wraptext is not updating when using references to another cell
 
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 V wrote:
*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 V wrote:
[b]I think WarpText only wraps text!

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

="'" & A2

Regards,
Sandy


---
Message posted from http://www.ExcelForum.com/

.
*



---
Message posted from http://www.ExcelForum.com/

.


Jurry[_4_]

wraptext is not updating when using references to another cell
 
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

--
Message posted from http://www.ExcelForum.com


Sandy V[_6_]

wraptext is not updating when using references to another cell
 
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

-----Original Message-----
Ok, that works. The only problem is now how to program it

in VBA: I have
an order sheet in which (200) cells, off which the

content is entered
by the user, has to be copied to another cell (which has

the wraptext
activated) in real time. Letting the user constantly

doubleclick the
row header is not really an option. Any clue how to

program that in
Excel?

Thanks,
Jurry.


---
Message posted from http://www.ExcelForum.com/

.



All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com