MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 30th, 2004, 10:38 AM   #1
Nic
 
Join Date: Mar 2004
Location: London
Posts: 10
Default Negative numbers viewed as text

Hi
I have some figures exported out of another application, which puts the negative sign at the end of the number. Excel then views this number as text. Anyone any ideas how I can convert these numbers to read as a negative in the proper format?

Thanks in advance
Nic
Nic is offline   Reply With Quote
Old Mar 30th, 2004, 11:02 AM   #2
fairwinds
MrExcel MVP
 
fairwinds's Avatar
 
Join Date: May 2003
Posts: 8,445
Default Re: Negative numbers viewed as text

Welcome!

You could try this formula:

=SIGN(RIGHT(A1,1)&1)*SUBSTITUTE(A1,"-","")
__________________
"Fair Winds and Following Seas"
fairwinds is offline   Reply With Quote
Old Mar 30th, 2004, 11:03 AM   #3
Andrew Poulsom
MrExcel MVP
 
Andrew Poulsom's Avatar
 
Join Date: Jul 2002
Posts: 31,599
Default Re: Negative numbers viewed as text

You can use this formula:

=(SUBSTITUTE(A1,"-","")+0)*IF(RIGHT(A1,1)="-",-1,1)

where A1 contains the imported number.
Andrew Poulsom is offline   Reply With Quote
Old Mar 30th, 2004, 12:13 PM   #4
PaddyD
MrExcel MVP
 
Join Date: May 2002
Posts: 12,554
Default

as I recall, there's also an option for this in the asap addin...
PaddyD is offline   Reply With Quote
Old Mar 30th, 2004, 01:27 PM   #5
bosco_yip
 
Join Date: Dec 2002
Posts: 673
Default Re: Negative numbers viewed as text

Try to use Text to Columns function :

Highlight your figures column>> Data>> Text to Columns…>> Next>> Next>> Finish

which will change the end negative sign number to a negative number

Regards
bosco_yip is online now   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 08:37 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.