Sub splitColumns()
Columns("E").Select
Selection.Insert Shift:=xlToRight
For each sell in sheets
Do
If activecell = "" then
end sub
else
end if
Range("D9").Activate
x = InStr(ActiveCell, " ")
ActiveCell.Offset(0, 1) = Mid(ActiveCell.Offset(0, 0), x, 8)
Activecell.offset(1,0)
Loop while activecell < ""
Next
End Sub
--
Best wishes,
Jim
"TomBP" wrote:
Hi everyone
I have the following problem. As you can see in the picture below I
have 2 columns.
[image: http://i54.photobucket.com/albums/g115/TomBP/Town.jpg]
Now what I want my macro to do is what you see in the next pictu
[image: http://i54.photobucket.com/albums/g1...BP/Postal.jpg]
There is a colum that has been inserted. In this column, which is named
Postal, the postal codes from the previous town column are pasted.
Now the hard part is that the postal codes aren't always numbers. They
can look like CH542 aswell. The only thing that is the same for the
town column is that there is a space between the town and the postal
code.
I hope you understand what I mean and thanks in advance.
--
TomBP
------------------------------------------------------------------------
TomBP's Profile: http://www.excelforum.com/member.php...o&userid=36112
View this thread: http://www.excelforum.com/showthread...hreadid=560659