+ Reply to Thread
Results 1 to 3 of 3

excel 97 how can i transform in the same cell 1.256.324 in 125.63

  1. #1
    Registered User
    Join Date
    08-30-2005
    Posts
    23

    excel 97 how can i transform in the same cell 1.256.324 in 125.63

    I want to transform in excel 97, a number ( ex: 1.256.324 in 125.63) but in the same cell. How can i do this?

    In my country money changed from 10.000 in 1 ; 100.000 , in 10...etc
    So i want excel to transform for me automatically an old sum of money in the new one. I want to write 1.256.324, and when i press enter this number to be transformed in 125.63. Thanx .... And thanx...

  2. #2
    Dave Peterson
    Guest

    Re: excel 97 how can i transform in the same cell 1.256.324 in 125.63

    One way is to use a worksheet event that looks for a change and reacts to your
    typing.

    You can try this code:

    RightClick on the worksheet tab that should have this behavior. Select view
    code and paste this into the code window that opens up:

    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)

    With Target
    If .Cells.Count > 1 Then Exit Sub
    If Intersect(.Cells, Me.Range("a:a")) Is Nothing Then Exit Sub
    If IsEmpty(.Value) Then Exit Sub
    If IsNumeric(.Value) = False Then Exit Sub

    On Error GoTo errHandler:
    Application.EnableEvents = False
    .Value = Format(.Value / 10000, "0.00")
    End With

    errHandler:
    Application.EnableEvents = True
    End Sub


    This routine only looks at changes in column A. You'll have to adjust that if
    your data entry is elsewhere.

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

    You can read more about these kinds of events at:
    Chip Pearson's site:
    http://www.cpearson.com/excel/events.htm

    David McRitchie's site:
    http://www.mvps.org/dmcritchie/excel/event.htm

    puiuluipui wrote:
    >
    > I want to transform in excel 97, a number ( ex: 1.256.324 in 125.63) but
    > in the same cell. How can i do this?
    >
    > In my country money changed from 10.000 in 1 ; 100.000 , in 10...etc
    > So i want excel to transform for me automatically an old sum of money
    > in the new one. I want to write 1.256.324, and when i press enter this
    > number to be transformed in 125.63. Thanx .... And thanx...
    >
    > --
    > puiuluipui
    > ------------------------------------------------------------------------
    > puiuluipui's Profile: http://www.excelforum.com/member.php...o&userid=26799
    > View this thread: http://www.excelforum.com/showthread...hreadid=400544


    --

    Dave Peterson

  3. #3
    Registered User
    Join Date
    08-30-2005
    Posts
    23

    Thanks

    You are the best.Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1