The below code is working for me but I need to make a few adjustments which I can't figure out. I have one column where a cell contains 4 delimited values and a dollar value. eg 22-4-3-7 $217560.00
My aim is to cut the delimited values into each of 4 different columns I have inserted leaving the original cell with only the dollar value.
Essentially the code works but has two minor issues.
1. The delimited values are copied to the columns correctly but aren't delete from the originating cell. Also the last value takes over itself plus the dollar value. So in the above example this would copy 7 $217560.00 to column 4 instead of the desired 7 being copied to column 4.
2. The numbers when copied to the new columns are in text format and dollar vlaue
the formats I am trying for are
My aim is to cut the delimited values into each of 4 different columns I have inserted leaving the original cell with only the dollar value.
Essentially the code works but has two minor issues.
1. The delimited values are copied to the columns correctly but aren't delete from the originating cell. Also the last value takes over itself plus the dollar value. So in the above example this would copy 7 $217560.00 to column 4 instead of the desired 7 being copied to column 4.
2. The numbers when copied to the new columns are in text format and dollar vlaue
the formats I am trying for are
Code:
Selection.NumberFormat = "$#,##0.00"
Selection.NumberFormat = "0"
Code:
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range("Table1[[#Headers],[career]]").Select
ActiveCell.FormulaR1C1 = "car_earn"
Range("Table1[[#Headers],[Column4]]").Select
ActiveCell.FormulaR1C1 = "car_start"
Range("Table1[[#Headers],[Column3]]").Select
ActiveCell.FormulaR1C1 = "car_first"
Range("Table1[[#Headers],[Column2]]").Select
ActiveCell.FormulaR1C1 = "car_second"
Range("Table1[[#Headers],[Column1]]").Select
ActiveCell.FormulaR1C1 = "car_third"
With Sheets("Sheet1")
Dim arr As Variant, x As Long
arr = .Range("AH:AH" & .UsedRange.Rows.Count)
For x = 1 To UBound(arr)
.Range("AI" & x & ":AL" & x).Value = Split(arr(x, 1), "-")
Next x
End With