Excel - How to abs entire column

J

John E.

I'm new to Excel and would like to change all negative numbers appearin
in a non calculated column to positive numbers. The problem result
from a bug exporting Quickbooks Pro invoices to Excel, in th
"quantities" column, and would like a quick macro to fix, versu
changing each column entry to a positive number by hand.

Thanks,
Joh
 
J

Jim Rech

Select the range and run this:

Sub ToPos()
Dim Cell As Range
For Each Cell In Selection
Cell.Value = Abs(Cell.Value)
Next
End Sub


--
Jim Rech
Excel MVP
| I'm new to Excel and would like to change all negative numbers appearing
| in a non calculated column to positive numbers. The problem results
| from a bug exporting Quickbooks Pro invoices to Excel, in the
| "quantities" column, and would like a quick macro to fix, versus
| changing each column entry to a positive number by hand.
|
| Thanks,
| John
|
|
| ---
| Message posted
|
 
C

Charlie

John,

If your numbers are formatted -15, -125 etc. then
highlight the column containing the numbers and do an
Edit/Replace with a - in the 'Find what' and nothing in
the 'Replace with' and select replace all.

Charlie O'Neill
 
G

Gord Dibben

Enter -1 in a cell.

Copy this then select your negative numbers(column of) and Paste
Special>Multiply>OK>Esc.

Delete the -1 from the the cell.

Gord Dibben Excel MVP
 
G

Gordon

Jim Rech cogitated deeply and scribbled thusly:
Select the range and run this:

Sub ToPos()
Dim Cell As Range
For Each Cell In Selection
Cell.Value = Abs(Cell.Value)
Next
End Sub
REALLY? The OP said he "was NEW" to Excel! Why not give the simple
solution like paste-special-multiply with -1 ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top