Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I Atomatically Split Cell Contents
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I Atomatically Split Cell Contents
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. -- Gary''s Student - gsnu200715 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Can I Atomatically Split Cell Contents
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 "Gary''s Student" wrote: 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. -- Gary''s Student - gsnu200715 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there any way to split contents of a cell into more cells. | Excel Discussion (Misc queries) | |||
split contents of cell | Excel Discussion (Misc queries) | |||
VBA to split contents of cell | Excel Discussion (Misc queries) | |||
Split contents of a cell | Excel Worksheet Functions | |||
How to split the contents of a cell between two cells. | Excel Worksheet Functions |