MrManBoy
New Member
- Joined
- May 28, 2014
- Messages
- 37
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
Hi All,
Issue: I am having issues with the following code to reach the desired outcome. I have had only some success with it in what I want it to do; Maybe I have misunderstood something
Example Data: The font in bold is what I am trying to achieve with the above code.
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD]Column H[/TD]
[TD]Column I[/TD]
[TD]Column J[/TD]
[/TR]
[TR]
[TD]12345.HR Manager[/TD]
[TD]12345
[/TD]
[TD]HR Manager
[/TD]
[/TR]
[TR]
[TD]12345.HR Manager, Boss & CEO[/TD]
[TD]12345[/TD]
[TD]HR Manager, Boss & CEO
[/TD]
[/TR]
[TR]
[TD]246810.CFO & CIO[/TD]
[TD]246810
[/TD]
[TD]CFO & CIO
[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance
Issue: I am having issues with the following code to reach the desired outcome. I have had only some success with it in what I want it to do; Maybe I have misunderstood something
Code:
Dim LR As Long, i As Long, X As Variant
LR = Range("H" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With Range("H" & i)
X = Split(.Value)
.Offset(, 1).Resize(, UBound(X) + 1).Value = X
End With
Next i
Example Data: The font in bold is what I am trying to achieve with the above code.
[TABLE="class: outer_border, width: 500, align: left"]
<tbody>[TR]
[TD]Column H[/TD]
[TD]Column I[/TD]
[TD]Column J[/TD]
[/TR]
[TR]
[TD]12345.HR Manager[/TD]
[TD]12345
[/TD]
[TD]HR Manager
[/TD]
[/TR]
[TR]
[TD]12345.HR Manager, Boss & CEO[/TD]
[TD]12345[/TD]
[TD]HR Manager, Boss & CEO
[/TD]
[/TR]
[TR]
[TD]246810.CFO & CIO[/TD]
[TD]246810
[/TD]
[TD]CFO & CIO
[/TD]
[/TR]
</tbody>[/TABLE]
Thanks in advance