Can I Atomatically Split Cell Contents

G

Guest

I am currently using a workbook to assist in filling out several forms by
using only one input form. My problem is that two of the fields can contain a
lot of text and only the first 1024 will display.

Is there code that will count the characters and, if required, split them
over two cells?

TIA
 
G

Guest

Say A1 contains a very large volumn of text. This macro:

Sub fracture()
s = Split(Range("a1").Value, " ")
i = 1
t = ""
For j = 0 To UBound(s)
t = t & s(j) & " "
If Len(t) > 1000 Or j = UBound(s) Then
Cells(i, "B").Value = t
t = ""
i = i + 1
End If
Next
End Sub


will take that text and distribute it into B1,B2,B33,..... with about 1000
characters in each cell.
 
G

Guest

Thanks for this, but it doesn't seem to work. Of course this may be because I
failed to mention that the cell containing the text is a merged cell. Is ther
any way around it?

Just to be sure I'm not altering anything I shouldn't - the text is in E12
(E12:R12 merged) and i need it to drop down to the following rows.

Thanks
 

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

Top