Sub removetrailingunderscore()
Dim mywb As Workbook
Dim myws_Bef As Worksheet
Dim myws_Aft As Worksheet
Dim myval As String
Dim c As Range
Dim rng As Range
Set mywb = Application.ActiveWorkbook
Set myws_Bef = mywb.Sheets("Before")
Set myws_Aft = mywb.Sheets("After")
Set rng = Range(Cells(2, "AW"), Columns("AW").End(xlDown))
'Remove _ from beginning of AW
For Each c In rng
c.Value = Right(c.Value, Len(c) - 1)
'MsgBox c.Value
Next
'Format as number
Columns("AW:AW").Select
Selection.NumberFormat = "0"
End Sub
Sub splitcellatspace()
Dim mywb As Workbook
Dim myws_Bef As Worksheet
Dim myws_Aft As Worksheet
Dim myval As String
Dim c As Range
Dim rng As Range
Dim str1() As String
Dim str2() As String
Dim strX() As String
Dim Sx() As String
Dim avarsplit As Variant
Set mywb = Application.ActiveWorkbook
Set myws_Bef = mywb.Sheets("Before")
Set myws_Aft = mywb.Sheets("After")
Set rng = Range(Cells(2, "AW"), Columns("AW").End(xlDown))
RowCount = 0
For Each c In rng
c.Activate
RowCount = RowCount + 1
avarsplit = c.Value
If InStr(1, avarsplit, " ") > 0 Then
Sx = Split(avarsplit, " ")
If LBound(Sx) - UBound(Sx) <> 0 Then
For i = LBound(Sx) To UBound(Sx)
ActiveCell.Offset(i + 1, 0).EntireRow.Insert shift:=xlDown
c.Offset(i, 0).Value = Sx(i)
Next
End If
End If
Next
End Sub