Converting numbers

M

Mike

Can somebody outthere please help me wit this issue. How
do i convert a positive number into negative, when there
is a column full of numbers that needs to be converted
 
N

Niek Otten

Hi Mike,

Im an empty cell, enter the number -1. Edit>Copy.
Select your column, Edit>Paste Special, check Multiply


--
Kind Regards,

Niek Otten

Microsoft MVP - Excel
 
B

Bob Phillips

Mike,

This bit of code converts column A

Sub Convert()
Dim cell As Range

For Each cell In Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
cell.Value = Abs(cell.Value)
Next cell

End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

Niek,

This will negate any negative numbers in the column.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
K

Ken Wright

Bob,

This will negate any negative numbers in the column. <VBG> ( Beat you to it
Niek!! :-> )

Sub Convert()
Dim cell As Range

For Each cell In Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
cell.Value = -Abs(cell.Value)
Next cell

End Sub
 

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