Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Heather
 
Posts: n/a
Default strip minus signs from right to left

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.
  #2   Report Post  
Heather
 
Posts: n/a
Default

Found it! Thanks PJB
=IF(RIGHT(A1,1)="-",-SUBSTITUTE(A1,"-",""),A1)

"Heather" wrote:

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.

  #3   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Thu, 21 Apr 2005 09:39:26 -0700, "Heather"
wrote:

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
The left function does not work when displaying times, how is thi. Nambo27 Excel Worksheet Functions 3 February 25th 05 06:46 PM
I want to get brackets round my figures not minus signs Peru Excel Discussion (Misc queries) 3 February 3rd 05 09:30 PM
header in right or left margin? Michelle Excel Discussion (Misc queries) 2 January 26th 05 04:44 PM
minus formel/fortegn Bella Excel Discussion (Misc queries) 1 December 15th 04 08:37 PM
Importing values w/trailing minus signs RWN Excel Discussion (Misc queries) 1 December 11th 04 05:05 AM


All times are GMT +1. The time now is 02:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"