View Full Version : Absolute value
leal72
11-16-2009, 02:55 PM
I'm importing a text (*.txt) file and one of the columns is a negative number, without adding another column is ther a way to make all the values absolute?
lucas
11-16-2009, 02:56 PM
You didn't say what the range is:
Option Explicit
Sub a()
Dim cell As Range
Application.ScreenUpdating = False
With ActiveSheet
For Each cell In .Range("F2:F2000")
' If Not cell.Value = "" Then
cell.Value = Abs(cell.Value)
If cell.Value = 0 Then cell.Value = ""
Next cell
End With
Application.ScreenUpdating = True
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.