+ Reply to Thread
Results 1 to 2 of 2

How do i input euros and have it convert into dollars in the same.

  1. #1
    n1ghthawk
    Guest

    How do i input euros and have it convert into dollars in the same.

    How do I input euros and have it convert into dollars in the same cell?

  2. #2
    JE McGimpsey
    Guest

    Re: How do i input euros and have it convert into dollars in the same.

    One way:

    Use a worksheet change event macro. Put this in your worksheet code
    module (right-click on the worksheet tab and choose View Code):

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    With Target
    If .Address(False, False) = "A1" Then
    Application.EnableEvents = False
    .Value = Application.Round(.Value * _
    Evaluate(ThisWorkbook.Names("Conv_Rate").Value), 2)
    .NumberFormat = "$#,##0.00"
    Application.EnableEvents = True
    End If
    End With
    End Sub

    This assumes you have a name "Conv_Rate" (Insert/Name/Define...) with
    the conversion rate. If you have the conversion rate in a cell, use

    .Value = Application.Round(.Value * Range("B1").Value, 2)

    Note that, with XL00/02/03 you can use VBA's Round() function, which
    gives slightly different results - i.e., rounding a 5 in the last digit
    to the nearest even number, instead of ROUND()'s rounding away from zero.



    In article <[email protected]>,
    n1ghthawk <[email protected]> wrote:

    > How do I input euros and have it convert into dollars in the same cell?


+ 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