Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Word Wrap not Wrapping

Status
Not open for further replies.

annacady

MIS
Oct 22, 2001
54
US
One office needs to track all new bills introduced in the state legislature each session. Several years ago we created a spreadsheet with three worksheets. The first worksheet is called "Input" and data is entered in there from whichever (House or Senate) introduced it first(there are companion bills in both the House and the Senate and they have different numbers, so there is a column for both). The data in the Input spreadsheet can be sorted by House File number or Senate file number.

There are two additional worksheets (which fill in by formulas's) called (surprise) House and Senate. The problem this year is that cells that are word wrapped only show either the first, middle or last line of text (haven't found the pattern yet) on those two worksheets created by formula's (worked perfectly last year). When you highlight the column and check the formating; it is checked to wrap text. Take the checkmark off, put it back on and all the cells are wrapped and print. The problem is this has to be redone many times a day. It does not stay as you move back and forth between the Input worksheet and going to the other worksheets to print.

How can I set test wrapping once and atay on the column and have it work all the time? I have not figured out what changed between last year and this year.

Thanks in advanced for any help.
 
This sounds too simplistic, but worth a try.

After applying you proper formatting, select the entire worksheet and go to Format, Rows, Autofit. See if wrapping stays.

Member- AAAA Association Against Acronym Abusers
 
Thanks for the idea. I tried it and the box stays checked, but the words don't wrap unless I uncheck and recheck (don't even need to go out of the dialogue box).
 
Are you using zoom setting of less than 100%? or rather less than 80%?

Member- AAAA Association Against Acronym Abusers
 
The zoom is 100%. I did notice that the font on the input page was different than the pages used for printing, so I changed that and it did not make a difference.

Another thing I tried was to recreate the spreadsheet. I set all the formating and then inserted the absolute formula's on the second and third sheet. Word wrap is still checked albeit greyed out until I uncheck it and recheck it.

I am beginning to think that some Windows update changed something as it worked last year.
 
A registry setting will prevent this from happening (make a backup copy of the registry first):


Go to Start, Run
Type regedit then click OK
Expand HKEY_CURRENT_USER by clicking the + sign just to the left
Navigate to Software, Microsoft, Office, 11.0, Excel, Options (11 may be 10 or 9 depending on your version)
Choose Edit>New>DWORD Value
Change the name for the DWORD to: FontSub
Press Enter to complete the renaming
Choose Edit>Modify
Type 0 as the value, select Decimal, and click OK
Close the Registry Editor




Member- AAAA Association Against Acronym Abusers
 
Thanks for that registry information. I did that and still no word wrap. I completely closed Excel before changing the registry and then reopened it. I have not rebooted the machine.

Thanks so much for helping me try to fix this. Right now I am thinking of writing a macro to reset word wrap just before printing, but they will have to remember to run it each time.
 
but they will have to remember to run it each time.
Have a look at the Before_Print event if you go the VBA route.


Gavin
 
Thanks for that reminder but I really do not know what the Before_Print event is. I did a couple of searches and have not found a clear explanation. I will keep searching.
 
If you press ALT/F11 while in the spreadsheet, visual basic editor pops up. You would double click This Workbook and copy macro similar to one below in the blank pane on the right.

This macro takes cells B2 to B6 and sets word wrap on.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Range("B2:B6").Select
With Selection
.WrapText = True
End With
End Sub


Member- AAAA Association Against Acronym Abusers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top