Hey there all you programmers! I'm a novice who's trying to get a macro to work. I got the code for the macro on this forum, previously. It's purpose is to take a cell with a carriage return and split the data into multiple successive cells. In other words, "Name(CR)Address" in one cell will become 2 cells--Cell 1: Name / Cell 2: Address.
Here's the code:
My problem is, when I run the macro I'm getting a Compile error: Sub or function not defined.![]()
Sub test() Dim AddressElements Dim k As Integer AddressElements = Split(ActiveCell.Value, Chr(10)) For k = 0 To 2 ActiveCell.Offset(0, k) = AddressElements(k) Next k End Sub
What am I doing wrong? Or more appropriately, what am I doing?
Thanks all.
--KKL
Bookmarks