Thread: trailing minus
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
via135 via135 is offline
external usenet poster
 
Posts: 94
Default trailing minus

On Nov 25, 2:29 am, "T. Valko" wrote:
Try this macro from Dana DeLouis.

Sub TrailingMinus()
' = = = = = = = = = = = = = = = =
' Use of CDbl suggested by Peter Surcouf
' Program by Dana DeLouis
' = = = = = = = = = = = = = = = =
Dim rng As Range
Dim bigrng As Range

On Error Resume Next
Set bigrng = Cells.SpecialCells(xlConstants, xlTextValues).Cells
If bigrng Is Nothing Then Exit Sub

For Each rng In bigrng.Cells
rng = CDbl(rng)
Next
End Sub

Select the range of cells in question and run the macro. Post back if you
need help on how to run a macro.

--
Biff
Microsoft Excel MVP

"via135" wrote in message

...



On Nov 24, 11:24 pm, "T. Valko" wrote:
Try this.


Select the range of cells in question
Goto the menu DataText to Columns
Click Next twice
Click Advanced
Make sure Trailing minus for negative numbers is checked
OK
Finish


--
Biff
Microsoft Excel MVP


"via135" wrote in message


...


hi


while importing a txt file into xl there is one column which is in txt
format having figures with trailing minus (ex: 100-, 150-,100000-).
how can i change them into real numbers for arithmetical
operations??? added to the head ache is that the column is aligned
horizontally centred!!!


any hlp pl?!


-via135- Hide quoted text -


- Show quoted text -


///Make sure Trailing minus for negative numbers is checked ///


hi Biff


there is no option in the advanced text import settings for trailing
minus.!


the options available are "Decimal seperator" & "Thousand seperator"
i'm using ms office 2000 premium.!


-via135- Hide quoted text -


- Show quoted text -


hi Biff

yes it is..thks..works like a charm!


-via135