I am trying to figure out a way to formulate or format a column to reflect
particular currencies based on that text located in another column (for
example, if Column A denotes USD or Euro, is there a a formula that will
apply that currency symbol to a value located in Column C or a way to
conditionally format Column C based on what is written in Column A)? I am
using Excel 2003. Thanks.
This seems to work ;insert the code into a WorkSheet module
Private Sub Worksheet_Change(ByVal Target As Range)
If Union(Range(quot;$A1:$A12quot;), Target).Address = Range(quot;$A1:$A12quot;).Address
Then
If Target = quot;USAquot; Then
ActiveCell.Offset(-1, 2).Range(quot;A1quot;).Select
Selection.NumberFormat = quot;$#,##0.00quot;
ElseIf Target = quot;Euroquot; Then
ActiveCell.Offset(-1, 2).Range(quot;A1quot;).Select
Selection.NumberFormat = quot;#,##0.00 [$€-1]quot;
End If
End If
End Sub--
davesexcel------------------------------------------------------------------------
davesexcel's Profile: www.excelforum.com/member.php...oamp;userid=31708
View this thread: www.excelforum.com/showthread...hreadid=543828
- Jul 16 Mon 2007 20:38
conditional formatting for currency
close
全站熱搜
留言列表
發表留言