Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Toronto, Canada, Ontario
    Thanked 0 Times in 0 Posts

    Currency Transformation (XP)

    I'm not a heavy Excel user, but it strikes me I ought be able to do this. Once a year, I need to update my books for my accountant. The currencies are US dollars and Mexican Pesos. Both need to be translated into Canadian Dollars. Is there a way I can have an entry in a column automatically translated into C$ when i enter it? I know I can create matching columns where the second column contains the conversion, but I don't really want that. I want the number I enter to be re-calculated as I enter it. Is this possible?


  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Dublin, Ireland, Republic of
    Thanked 0 Times in 0 Posts

    Re: Currency Transformation (XP)

    Try using the WorkSheet_Change event, The following example code adjusts any numeric entry in column B by a factor of 1.2

    Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    If Target.Column = 2 And IsNumeric(Target) Then
    Target = Target * 1.2
    End If
    Application.EnableEvents = True
    End Sub

    To use the code right click on the relevant sheet tab, select View code and place the code in the available code pane.

    Andrew C.

Posting Permissions

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