7 replies
by dklippert
by dklippert
My bad (as the kids say) My first answer was worong.
Here's a macro I picked up somewhere that will do what you want:
Sub RemoveTrailingMinus()
On Error Resume Next
Dim cell As Range
Dim TempVal As String
With Worksheets("Sheet1")
For Each cell In .Cells. _
SpecialCells(xlCellTypeConstants, xlTextValues)
TempVal = cell.Value
If Right(TempVal, 1) = "-" Then
cell.Value = Left(TempVal, _
Len(TempVal) - 1) * 1
Else
cell.Value = TempVal * 1
End If
Next
End With
End Sub
by dklippert
And one more piece of errata. In the macro above, subsitute this line
Len(TempVal) - 1) * -1
That restores the number to its negative attitude.
by windlej
by goldenjl
by windlej
by windlej
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending