Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 172
Default Change Currency Format of Cell based on another Cell

Is there a way to dynamically change the currency format of a cell based on
the value of another cell dynamically.

For isntance cell A1 holds the text value "HKD", i want to change the
currency format of cell A2 to HKD. If the value in A1 is "SGD" then the
currency format of A2 will be SGD?

Is this possible?

Thanks.
Simon
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 103
Default Change Currency Format of Cell based on another Cell

Simon;

Create a column of text values for your currency. Then create a column of
character values for the symbol of that corresponding currency. Then create a
column of factorials based on a set currency. Do an If(lookup,Lookup,"")
statement that selects the value of the factorial based on the text value
that you assign in a predefined location.

God Bless

Frank Pytel

"Simon" wrote:

Is there a way to dynamically change the currency format of a cell based on
the value of another cell dynamically.

For isntance cell A1 holds the text value "HKD", i want to change the
currency format of cell A2 to HKD. If the value in A1 is "SGD" then the
currency format of A2 will be SGD?

Is this possible?

Thanks.
Simon

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Change Currency Format of Cell based on another Cell

Simon

You could do this using sheet event code.

Option Compare Text
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False

Select Case Target.Value
Case "HKD"
Target.Offset(1, 0).NumberFormat = "[$HKD] #,##0.00"

Case "SGD"
Target.Offset(1, 0).NumberFormat = "[$SGD] #,##0.00"

End Select
endit:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code".

Copy/paste into that sheet module.


Gord Dibben MS Excel MVP


On Sun, 2 Sep 2007 06:50:01 -0700, Simon
wrote:

Is there a way to dynamically change the currency format of a cell based on
the value of another cell dynamically.

For isntance cell A1 holds the text value "HKD", i want to change the
currency format of cell A2 to HKD. If the value in A1 is "SGD" then the
currency format of A2 will be SGD?

Is this possible?

Thanks.
Simon


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change cell color based upon data range within the cell? Chris Sanders Excel Worksheet Functions 1 March 6th 06 08:59 PM
How to format a cell to represent Indian Currency System? keje1010 Excel Discussion (Misc queries) 2 January 21st 06 08:28 AM
In Format>Cell>Numbers>currency>Symbol Please add "Rs. India" Surendera M Bhanot Excel Worksheet Functions 0 August 22nd 05 02:12 PM
How do I change the format of a cell based on what I input? Husker87 Excel Worksheet Functions 8 August 19th 05 10:45 PM
Change Currency symbol dependant upon selected cell value Fred Excel Discussion (Misc queries) 3 March 23rd 05 11:57 AM


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