Number formating

S

Sulaiman

I am downloading data from SAP into excel and all negative
numbers are read as (12345-). What do I need to do to get
the negative sign on the left side of the number and
format it correctly?
thanks for the help
 
G

Gord Dibben

Data>Text to Columns>Next>Next> check "general" >Finish.

Gord Dibben Excel MVP - XL97 SR2 & XL2002
 
D

Dave Peterson

I think that Gord's relying on a feature added to xl2002 (trailing minus for
negative numbers). It's hidden in step 3 of that Data|text to columns
wizard--under the advanced button. (and it's the default, too.)

If you have an earlier version, maybe you can run a macro that fixes them:

This was posted by Dana DeLouis:

Sub TrailingMinus()
' = = = = = = = = = = = = = = = =
' Use of CDbl suggested by Peter Surcouf
' Program by Dana DeLouis, (e-mail address removed)
' = = = = = = = = = = = = = = = =
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

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
G

Gord Dibben

Thanks Dave.

Gord is using XL2002 almost exclusively lately. I rarely take the time to
re-boot to double-check the XL97 features on my Win98 partition. A lot of "I
think I remember" going on.

Guess I could take the XL97 out of my sig any day now<g>

Gord
 
D

Don Guillett

I have xl95, xl97 sr2 and xl2002 all on my xp home computer.You can even use
both at once.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top