Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
n1ghthawk
 
Posts: n/a
Default 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   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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 ,
n1ghthawk wrote:

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

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



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