LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Pasting in paragraph of text, but with wordwrap?

After testing it looks like any text beyond the 255 character is clipped.

I never used this macro on a cell with that much text so hadn't tested all
cases.

I don't know how to revise the macro which Bob Flanagan originally wrote to
accommodate more text.

Hopefully one of the not-so-VBA-challenged people can revise this one or come up
with soemthing better.

Meantime, I'll work on it.

Gord

On Thu, 28 Jun 2007 16:20:55 -0700, "jbclem" wrote:

Hi Gord,

I've been trying to use this macro, and it works but it clips the text it's trying to wordwrap. I'm only getting about
half of the text that is wordwrapped, the rest just disappears. Is there a way to troubleshoot this problem?


jc


"Gord Dibben" <gorddibbATshawDOTca wrote in message ...
Can you live with a macro?

Select the cell with text and a few cells to right and below then run this
macro.

Sub Make_Paragraph()
Dim cell As Range
If ActiveCell.Row = 1 Then GoTo warning
If Selection.Columns.Count = 1 Then _
If MsgBox(Prompt:= _
"You have only selected a single column. " & _
"Is this wide enough for your paragraph?", _
Buttons:=vbYesNo) = vbNo Then End
For Each cell In Intersect(Selection, _
Selection.Cells(1, 1).EntireColumn)
If Left(cell.Formula, 1) = " " And _
IsEmpty(cell.Offset(-1, 0)) Then _
cell.Formula = "zz|zz" & Mid(cell.Formula, 2)
Next
Application.DisplayAlerts = True
On Error Resume Next
Selection.Justify
On Error GoTo 0
Cells.Replace What:="zz|zz", Replacement:=" ", _
LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Exit Sub
warning:
MsgBox "Activecell must not be in Row 1"
End Sub


Gord Dibben MS Excel MVP



On Thu, 21 Jun 2007 16:01:04 -0700, "jbclem" wrote:

I'm using Excel 2002 and trying to paste in a paragraph of text into a spreadsheet (worksheet). The problem is that
it's showing up on a single line(row) that goes all the way to column CK. I tried formatting the beginning cell and
checked wordwrap but then what I got was the text in a long vertical column of 1 cell wide rows.

What I really would like is this paragraph of text looking like a real paragraph, 5 or 10 columns wide and word

wrapped
inside the column limit. Is there a way to do this and could someone show me how?


Thanks....jc




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't see all of the paragraph text in the cell. KW Excel Discussion (Misc queries) 3 October 25th 06 02:16 PM
Pasting mutiple paragraph text into a single cell Peter Wells Excel Discussion (Misc queries) 2 June 24th 05 02:48 PM
Pasting Word table cell with paragraph markers into single Excel c Steve Excel Discussion (Misc queries) 1 June 16th 05 11:26 PM
How do I add (auto text) to a paragraph? Lisa Nelson Excel Worksheet Functions 1 May 4th 05 04:07 PM
Paragraph alignment in Excel when pasting from other Apps. Hari Prasadh Excel Discussion (Misc queries) 4 February 10th 05 08:46 AM


All times are GMT +1. The time now is 06:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"