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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dbl click autofit cells with line feeds 1

Status
Not open for further replies.

ClulessChris

IS-IT--Management
Jan 27, 2003
890
GB
a corporate system outputs data into an Excel spreadsheet. cell that have line feeds are displayed:
aaabbb, but on double click the cell is expanded and displays:
aaa
bbb
I've trying to replicate this for all used cells. A recorded macro shows:
Code:
    Range("A11").Select
    ActiveCell.FormulaR1C1 = "TIN" & Chr(10) & "TIN" & Chr(10) & ""
and if I debug.print ActiveCell.text before expanding the cell I get:
aaa
bbb

Any pointers gratefully received
Regards
 
...and your question is....

Maybe a sample workbook?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Just a guess here...
Select all cells, Ctrl+1
Alignment tab - Wrap Text checkbox.
If it is not checked, check it.

Have fun.

---- Andy

There is a great need for a sarcasm font.
 
Andy,

many thanks. I did it with:
Code:
    ActiveSheet.Columns.AutoFit
    ActiveSheet.UsedRange.WrapText = True
    ActiveSheet.Rows.AutoFit
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top