#1   Report Post  
Posted to microsoft.public.excel.misc
wilson@irco
 
Posts: n/a
Default flip negative sign

Using copy paste from AS400 to excel spreadsheet negative numbers do not read
negative because the negative sign remains on the right side of the number in
excel. Is there an easy way to flip the negative sign from the right side of
the number to the left side?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default flip negative sign

Dana DeLouis posted this:


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

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

wilson@irco wrote:

Using copy paste from AS400 to excel spreadsheet negative numbers do not read
negative because the negative sign remains on the right side of the number in
excel. Is there an easy way to flip the negative sign from the right side of
the number to the left side?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default flip negative sign

Hi

I use a free add-in from www.asap-utilities.com for this job. There are
loads of excellent (and useful) functions in the pack.

Andy.

"wilson@irco" wrote in message
...
Using copy paste from AS400 to excel spreadsheet negative numbers do not
read
negative because the negative sign remains on the right side of the number
in
excel. Is there an easy way to flip the negative sign from the right side
of
the number to the left side?



  #4   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default flip negative sign

I suspect the AS/400 data is formatted as TEXT in Excel so you will have to
remove the "-" (minus) and then convert to a number.

if A1=1234-

Then in B1 put:

=SUBSTITUTE(A1,"-","")*-1

B1=-1234

If the data is in one column, you insert a helper column and copy a formula
down and then delete original column.

To cater for positive numbers, use:

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

Test first!

"wilson@irco" wrote:

Using copy paste from AS400 to excel spreadsheet negative numbers do not read
negative because the negative sign remains on the right side of the number in
excel. Is there an easy way to flip the negative sign from the right side of
the number to the left side?

  #5   Report Post  
Posted to microsoft.public.excel.misc
wilson@irco
 
Posts: n/a
Default flip negative sign

It works...thank you for that and the link for macro newbies. :)

"Dave Peterson" wrote:

Dana DeLouis posted this:


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

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

wilson@irco wrote:

Using copy paste from AS400 to excel spreadsheet negative numbers do not read
negative because the negative sign remains on the right side of the number in
excel. Is there an easy way to flip the negative sign from the right side of
the number to the left side?


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default flip negative sign

Try DataText to ColumnsNextNextAdvanced.

Checkmark "trailing minus for negative numbers".


Gord Dibben MS Excel MVP

On Thu, 9 Mar 2006 11:59:02 -0800, wilson@irco
wrote:

Using copy paste from AS400 to excel spreadsheet negative numbers do not read
negative because the negative sign remains on the right side of the number in
excel. Is there an easy way to flip the negative sign from the right side of
the number to the left side?


  #7   Report Post  
Posted to microsoft.public.excel.misc
wilson@irco
 
Posts: n/a
Default flip negative sign

Great. Thank you...you wouldn't happen to have the solution or at least an
attempt at the subtotal loop question proposed on 3/9 also. No one has
responded yet. I might need to dangle a carrot out there or something.
Surely it's doable. Thanks again.

"Gord Dibben" wrote:

Try DataText to ColumnsNextNextAdvanced.

Checkmark "trailing minus for negative numbers".


Gord Dibben MS Excel MVP

On Thu, 9 Mar 2006 11:59:02 -0800, wilson@irco
wrote:

Using copy paste from AS400 to excel spreadsheet negative numbers do not read
negative because the negative sign remains on the right side of the number in
excel. Is there an easy way to flip the negative sign from the right side of
the number to the left side?



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
EQUAL SIGN K Nguyen Excel Discussion (Misc queries) 2 December 15th 05 07:30 PM
Negative Values Only [email protected] Excel Discussion (Misc queries) 1 August 8th 05 08:58 PM
How can i put a negative sign on a range of selected cells? chermaine Excel Discussion (Misc queries) 3 August 8th 05 02:49 AM
FORMULA TO ADD POSITIVE AND NEGATIVE NUMBERS, REGARDLESS OF SIGN JON Excel Discussion (Misc queries) 3 July 18th 05 06:35 PM
Automatically put negative sign in cells with positive numeric dat ctdak Excel Discussion (Misc queries) 4 June 24th 05 09:41 PM


All times are GMT +1. The time now is 07:57 AM.

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

About Us

"It's about Microsoft Excel"