Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 26
Default how to display mainframe negative numbers on excel

Hi;
i have some negative numbers from a mainframe report and whant to used in a
excel worksheet, how can i do that, because excel uses the negative sign on
the left.
i.e data from mainframe:
0.128761-
1.234510
etc


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default how to display mainframe negative numbers on excel

Datatext to columns, click finish


--
Regards,

Peo Sjoblom



"Mario" wrote in message
...
Hi;
i have some negative numbers from a mainframe report and whant to used in
a
excel worksheet, how can i do that, because excel uses the negative sign
on
the left.
i.e data from mainframe:
0.128761-
1.234510
etc




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default how to display mainframe negative numbers on excel

If you have no negative sign in front then try this:

ctrl-H Find what: - Replace with: "leave blank" Replace All


"Mario" wrote:

Hi;
i have some negative numbers from a mainframe report and whant to used in a
excel worksheet, how can i do that, because excel uses the negative sign on
the left.
i.e data from mainframe:
0.128761-
1.234510
etc


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default how to display mainframe negative numbers on excel

Won't that take the intended negative value and make it positive?

Rick


"Teethless mama" wrote in message
...
If you have no negative sign in front then try this:

ctrl-H Find what: - Replace with: "leave blank" Replace All


"Mario" wrote:

Hi;
i have some negative numbers from a mainframe report and whant to used in
a
excel worksheet, how can i do that, because excel uses the negative sign
on
the left.
i.e data from mainframe:
0.128761-
1.234510
etc



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default how to display mainframe negative numbers on excel

i have some negative numbers from a mainframe report and whant
to used in a excel worksheet, how can i do that, because excel uses
the negative sign on the left.
i.e data from mainframe:
0.128761-
1.234510
etc


Would this off-the-top-of-my-head macro possibly be useful?

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo FixEvents
If Right$(Target.Text, 1) = "-" Then
Application.EnableEvents = False
Target.Value = "-" & Left$(Target.Text, Len(Target.Text) - 1)
Application.EnableEvents = True
End If
Exit Sub
FixEvents:
Application.EnableEvents = True
End Sub


Rick


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default how to display mainframe negative numbers on excel

if a helper column will fit u...try this formula
e.g.
Column A holds the data....*hidden characters or spaces b/w numbers not
assumed on sample*

on B1
=IF(RIGHT(TRIM(A1),1)="-",-1,1)*LEFT(TRIM(A1),LEN(TRIM(A1))-(RIGHT(TRIM(A1),1)="-")*1)

this might give a fresh raw numbers for excel use.

regards,
driller
--
*****
birds of the same feather flock together..



"Mario" wrote:

Hi;
i have some negative numbers from a mainframe report and whant to used in a
excel worksheet, how can i do that, because excel uses the negative sign on
the left.
i.e data from mainframe:
0.128761-
1.234510
etc


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 740
Default how to display mainframe negative numbers on excel

on B1
=IF(RIGHT(TRIM(A1),1)="-",-1,1)*LEFT(TRIM(A1),LEN(TRIM(A1))-(RIGHT(TRIM(A1),1)="-"))

--
*****
birds of the same feather flock together..



"driller" wrote:

if a helper column will fit u...try this formula
e.g.
Column A holds the data....*hidden characters or spaces b/w numbers not
assumed on sample*

on B1
=IF(RIGHT(TRIM(A1),1)="-",-1,1)*LEFT(TRIM(A1),LEN(TRIM(A1))-(RIGHT(TRIM(A1),1)="-")*1)

this might give a fresh raw numbers for excel use.

regards,
driller
--
*****
birds of the same feather flock together..



"Mario" wrote:

Hi;
i have some negative numbers from a mainframe report and whant to used in a
excel worksheet, how can i do that, because excel uses the negative sign on
the left.
i.e data from mainframe:
0.128761-
1.234510
etc


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default how to display mainframe negative numbers on excel

i have some negative numbers from a mainframe report and whant
to used in a excel worksheet, how can i do that, because excel uses
the negative sign on the left. i.e data from mainframe:
0.128761-
1.234510
etc


Would this off-the-top-of-my-head macro possibly be useful?

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo FixEvents
If Right$(Target.Text, 1) = "-" Then
Application.EnableEvents = False
Target.Value = "-" & Left$(Target.Text, Len(Target.Text) - 1)
Application.EnableEvents = True
End If
Exit Sub
FixEvents:
Application.EnableEvents = True
End Sub


Probably should test to make sure we really have a number before we change
it. Perhaps something like this....

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Number As Variant
On Error GoTo FixEvents
If Right$(Target.Text, 1) = "-" Then
Number = Left$(Target.Text, Len(Target.Text) - 1)
If IsNumeric(Number) Then
Application.EnableEvents = False
Target.Value = "-" & Number
Application.EnableEvents = True
End If
End If
Exit Sub
FixEvents:
Application.EnableEvents = True
End Sub


Rick

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default how to display mainframe negative numbers on excel

I presume that the negative numbers are treated by Excel as text,
whereas positive numbers are treated as numeric. If so, and assuming
the data is in column A, you could have a formula like:

=IF(ISNUMBER(A1),A1,-VALUE(LEFT(A1,LEN(A1)-1)))

Copy this down the column for as many rows as you have items in column
A. You can then fix the values in this column by highlighting it,
click <copy, then Edit | Paste Special | Values (check) | OK then
<Esc or <Enter. Then you can delete the original data in column A.

Hope this helps.

Pete

On Jun 27, 7:48 pm, Mario wrote:
Hi;
i have some negative numbers from a mainframe report and whant to used in a
excel worksheet, how can i do that, because excel uses the negative sign on
the left.
i.e data from mainframe:
0.128761-
1.234510
etc



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
display negative numbers as zero Andrea Excel Discussion (Misc queries) 3 November 21st 06 07:59 PM
Excel 2002 : Convert Positive Numbers to Negative Numbers ? Mr. Low Excel Discussion (Misc queries) 2 November 6th 06 03:30 PM
Excel Formula - Add column of numbers but ignore negative numbers view for Distribution List members Excel Worksheet Functions 1 April 7th 06 03:13 AM
How do you display negative numbers in the unit price column? 389Shell Excel Worksheet Functions 2 February 18th 05 06:47 PM
How do I display negative numbers in a differnt color font? Steve Excel Discussion (Misc queries) 3 December 16th 04 10:21 PM


All times are GMT +1. The time now is 07:26 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"