I have a column in excel that I import from a program and it always imports it in this format if these bars represent the cells, | | with trailing spaces and <> to represent a negative numbers. The positive numbers come out like this, | $758.92| also with trailing spaces. The number format is Currency and I want to be able to sum these numbers and not have to go down the column of 100 or 200 cells and change all of them.
I started a macro that I want to iterate over each cell and remove the trailing spaces and replace the <> with () to indicate a negative number and just remove the trailing spaces for the positive numbers.
Sub Macro1()
Dim i As Integer, d As Integer
i = 13
Do Until .Cells(4, i).Value = ""
For d = 4 To 100 *I want the loop to stop at the first empty cell.*
Cells(d, i) = Trim(Cells(d, i))
Cells(d, i) *Replace the < at the beginning and end with ()*
Next d
i = i + 1
Loop
End Sub