Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RJB
 
Posts: n/a
Default 'Text' instead of number

I have spent two days manipulating data (about 300,000 cells' worth) I
imported as Fixed-Width (from MAS-90, if anyone cares).

The final step involves multiplying two numbers.

The POSITIVE numbers imported fine, the NEGATIVE numbers imported as

X.000-

and give me a #VALUE! error when I use any math function with them.

I have tried the Trimall macro.

I am guessing that somehow Excel thinks the '-' is a DASH and not a
negative... How do I change that????


  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

See:

http://www.mcgimpsey.com/excel/postfixnegatives.html

HTH
Jason
Atlanta, GA

-----Original Message-----
I have spent two days manipulating data (about 300,000

cells' worth) I
imported as Fixed-Width (from MAS-90, if anyone cares).

The final step involves multiplying two numbers.

The POSITIVE numbers imported fine, the NEGATIVE numbers

imported as

X.000-

and give me a #VALUE! error when I use any math function

with them.

I have tried the Trimall macro.

I am guessing that somehow Excel thinks the '-' is a

DASH and not a
negative... How do I change that????


.

  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

Data|Text to Columns has an Advanced button (Excel 2003) for trailing
minuses you can check.

RJB wrote:
I have spent two days manipulating data (about 300,000 cells' worth) I
imported as Fixed-Width (from MAS-90, if anyone cares).

The final step involves multiplying two numbers.

The POSITIVE numbers imported fine, the NEGATIVE numbers imported as

X.000-

and give me a #VALUE! error when I use any math function with them.

I have tried the Trimall macro.

I am guessing that somehow Excel thinks the '-' is a DASH and not a
negative... How do I change that????


  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

For Excel 2002 onwards you can use datatext to columns, clcik next twice, in
step 3 select advanced and trailing minus for negative numbers, click finish

in earlier versions you would need a macro or a help formula

Sub Fix_Minus()
Dim cell As Range
On Error Resume Next
For Each cell In Selection.Cells.SpecialCells(xlConstants, xlTextValues)
cell.Value = CDbl(cell.Value)
Next cell
End Sub

(press alt + f11, click insert module, paste in the above, press alt + q,
select the import, press alt + f8 and run the macro)

formula would be

=IF(RIGHT(A1,1)="-",-SUBSTITUTE(A1,"-",""),A1)

copy and paste special as values over the old range


Regards,

Peo Sjoblom

"RJB" wrote:

I have spent two days manipulating data (about 300,000 cells' worth) I
imported as Fixed-Width (from MAS-90, if anyone cares).

The final step involves multiplying two numbers.

The POSITIVE numbers imported fine, the NEGATIVE numbers imported as

X.000-

and give me a #VALUE! error when I use any math function with them.

I have tried the Trimall macro.

I am guessing that somehow Excel thinks the '-' is a DASH and not a
negative... How do I change that????


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
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM
How to format a number in Indian style in Excel? Victor_alb Excel Discussion (Misc queries) 2 December 21st 04 04:21 AM
Converting text to number - how?? yahoo Excel Discussion (Misc queries) 3 December 15th 04 11:01 PM
How can I asign a number value to a text line in Excel? AIF_GoofyDo2 Charts and Charting in Excel 0 December 6th 04 01:19 AM
convert number into corrseponding text mustafa Excel Discussion (Misc queries) 1 November 29th 04 12:50 PM


All times are GMT +1. The time now is 02:42 PM.

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

About Us

"It's about Microsoft Excel"