Hi all,
Today I have written one more small macro in Excel to split the data with the delimiter and copy to the columns which are beside to the data.
Sub splitdata()
Dim data As String
Dim values As Variant
Dim i As Long
Set DataRange = Range("A1").CurrentRegion
Range("A1").Select
For Each cell In Range("A1").CurrentRegion
'Getting text from the cell
data = cell.Text
'MsgBox ("Data :" & data)
'Gettings Values
values = split(data, ",")
For i = 0 To UBound(values)
'MsgBox ("Value is: " & values(i))
'Splitting to other columns
cell.Offset(0, i + 1).Value = values(i)
Next i
Next cell
'Autofit the content to the column
Cells.EntireColumn.AutoFit
End Sub
Please send your feedback and comments to psrdotcom@gmail.com
Subscribe to:
Post Comments (Atom)
Featured Post
Java Introdcution
Please send your review and feedback to psrdotcom@gmail.com
-
Hi all, Today, I'll explain how to uninstall completely the openjdk from the RedHat Enterprise Linux (RHEL) machine. Some of the sof...
-
Hi folks, Today we are going to see, how we can run or deploy the Go (Golang) project in IIS. Development Create your Golang project with w...
-
Hi friends, I have updated my Aadhaar details from Aadhaar update center. It is mentioned that within 72 hours, my details will be update...
No comments:
Post a Comment