Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert data of cells to any type: Number, Date&Time, Text | Excel Discussion (Misc queries) | |||
How to format a number in Indian style in Excel? | Excel Discussion (Misc queries) | |||
Converting text to number - how?? | Excel Discussion (Misc queries) | |||
How can I asign a number value to a text line in Excel? | Charts and Charting in Excel | |||
convert number into corrseponding text | Excel Discussion (Misc queries) |