MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Moving Minus Sign


Posted by Hal T. on February 28, 2001 7:43 AM

I have a column of numbers I am importing from an outside source. Some of the numbers are negative, but the minus sign is after the number, for example

100
25-
354
250-
119
2
25
2-

I need to move the minus sign before the number.

Any suggestions? Vba or Excel.

Thanks,


Posted by Aladin Akyurek on February 28, 2001 7:54 AM

5 -

Assuming these number in A.

In B1 enter: =IF(ISNUMBER(A1),A1,VALUE("-"&LEFT(A1,LEN(A1)-1)))

Copy this down as far as needed. After conversion, you might copy the values in B and paste over A via Paste Special|Values, if you wish.

Aladin

Posted by Hal T. on February 28, 2001 11:59 AM

5 -

PERFECTO! Worked like a charm.

Thanks

Hal