strip minus signs from right to left

G

Guest

When I import to excel from our accounting system, negative numbers show the
minus sign at the right e.g. 100- instead of -100 or (100) Excel reads this
as text and I have to go through the list manually inserting a minus sign at
the left and deleting the minus sign from the right.

Is there any easier way to do this? The numbers are not a fixed length, so
the - could be the third or the thirteenth character in the cell.
 
R

Ron Rosenfeld

When I import to excel from our accounting system, negative numbers show the
minus sign at the right e.g. 100- instead of -100 or (100) Excel reads this
as text and I have to go through the list manually inserting a minus sign at
the left and deleting the minus sign from the right.

Is there any easier way to do this? The numbers are not a fixed length, so
the - could be the third or the thirteenth character in the cell.

What version of Excel do you have?

Later versions (2002+, possibly earlier) can do this automatically -- easiest
if your data to be converted is in columns.

Select the relevant column (one column at a time).

From the main menu, select Data/Text to Columns
Next
Next
Advanced: Ensure "Trailing minus for negative numbers" is SELECTED.
OK
Finish

If you have an earlier version, or a complicated distribution of numbers with
trailing negatives, post back and we can use a VBA routine.


--ron
 

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