Search This Blog

Saturday 4 August 2012

SPLIT CELL CHARACTERS USING VBA



Paste the below code in the module, select the cell you want to split and run the code.


Sub split_cell_char()
Dim i As Integer
For i = 1 To Len(ActiveCell)
ActiveCell.Offset(0, i) = VBA.Mid(ActiveCell, i, 1)
Next
ActiveSheet.UsedRange.Columns.AutoFit
End Sub

Did it help you? Please post your valuable comment. Thanks!!

No comments:

Post a Comment