I am trying to figure out how to make excel create a new cell after 600 characters and to take all characters from 601 and on and put into a new cell.
Anyone know if this is possible?
Thanks
I am trying to figure out how to make excel create a new cell after 600 characters and to take all characters from 601 and on and put into a new cell.
Anyone know if this is possible?
Thanks
With characters in A1, in B1 enter:
=MID(A1,601,9999)
Gary's Student
You will need a macro.
I assume you are inputting the data manually. I will address that first.
The marco will need to be sheet specific. [ right click on the sheet name at the bottom of excel and select view code ]
It will need to use the worksheet change event. [ Select Worksheet on the left hand list box and worksheet_change on the right hand list box ].
The macro will simple look at the length of the text in the target cell and if the length is > 600 it will select a cell offset below the target cell and carry on inputting data there.
Thats it.
This would be the code:-
![]()
Public changeflag As Integer Private Sub Worksheet_Change(ByVal Target As Range) If changeflag = 1 Then Exit Sub chqngeflag = 1 If Len(Target.Value) <= 600 Then Exit Sub Target.Offset(1, 0).Value = Right(Target.Value, Len(Target.Value) - 600) Target.Value = Left(Target.Value, 600) Target.Offset(1, 0).Select changeflag = 0 End Sub
Last edited by mehmetcik; 12-29-2013 at 06:57 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks