So, I have a bunch of columns that need to be replaced with a letter, this is old signed overpunch stuff. So basically what i want to do is replace the letters with numbers and then multiply it by 0.02 for each cell.
However I want to make it so I can specify I range and then output this new information in a new work sheet.
So basically, I'll have a column like 1. 0000012C = 00000123 x 0.02 = 2.46 2. 0002927B = 29272 x 0.02 = 585.44
Private Sub CommandButton1_Click()
Dim OriginalText As String
Dim CorrectedText As String
OriginalText = Range("A1:D15").Value
CorrectedText = Replace(OriginalText, "A", "1")
CorrectedText = Replace(OriginalText, "B", "2")
CorrectedText = Replace(OriginalText, "C", "3")
CorrectedText = Replace(OriginalText, "D", "4")
CorrectedText = Replace(OriginalText, "E", "5")
CorrectedText = Replace(OriginalText, "F", "6")
CorrectedText = Replace(OriginalText, "G", "7")
CorrectedText = Replace(OriginalText, "H", "8")
CorrectedText = Replace(OriginalText, "I", "9")
CorrectedText = Replace(OriginalText, "{", "0")
CorrectedText = Replace(OriginalText, "}", "-0")
Worksheets("Sheet1").Range("F1:I15").Value = CorrectedText
End Sub
This is what I have so far, but I don't think I'm doing this correctly, could any one with more vb experience in excel take a look.