O
Optitron
I want to remove the -'s from the value with the red arrow below. I
moves a number from one sheet to another. The format is like thi
555-55-555-5555 but I want the dashes removed when I click the macr
button:
Sub ORDER1()
Dim toWks As Worksheet
Dim actWks As Worksheet
Dim myRng As Range
Dim myCell As Range
Dim iRow As Long
Dim DestCell As Range
Set actWks = ActiveSheet
Set toWks = Worksheets("ORDER")
Set myRng = Intersect(Selection.EntireRow, actWks.Range("a:a"))
With toWks
Set DestCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
End With
With toWks
For Each myCell In myRng.Cells
iRow = myCell.Row
DestCell.Value = actWks.Cells(iRow, "a").Value
DestCell.Offset(0, 5).Value = actWks.Cells(iRow, "N").Value <==
DestCell.Offset(0, 11).Value = actWks.Cells(iRow, "F").Value
Set DestCell = DestCell.Offset(1, 0) '<<<changed
Next myCell
End With
End Su
moves a number from one sheet to another. The format is like thi
555-55-555-5555 but I want the dashes removed when I click the macr
button:
Sub ORDER1()
Dim toWks As Worksheet
Dim actWks As Worksheet
Dim myRng As Range
Dim myCell As Range
Dim iRow As Long
Dim DestCell As Range
Set actWks = ActiveSheet
Set toWks = Worksheets("ORDER")
Set myRng = Intersect(Selection.EntireRow, actWks.Range("a:a"))
With toWks
Set DestCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
End With
With toWks
For Each myCell In myRng.Cells
iRow = myCell.Row
DestCell.Value = actWks.Cells(iRow, "a").Value
DestCell.Offset(0, 5).Value = actWks.Cells(iRow, "N").Value <==
DestCell.Offset(0, 11).Value = actWks.Cells(iRow, "F").Value
Set DestCell = DestCell.Offset(1, 0) '<<<changed
Next myCell
End With
End Su