change currency format based on another cell format

jimthomas22

New Member
Joined
Jul 28, 2011
Messages
2
Hi
I am trying to change the currency format of one cell based on the currency format of another cell. So if cell A1 is £5.00 and cell B1 is £10.00 when the format of the master cell (A1) is change to $ then B1 will automatically change to $10.00.

Can anyone help?

Thanks Jim
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Try...
Code:
Sub CHangecurr()
If Range("A1").NumberFormat = "$#,##0.00" Then
    Range("B1").NumberFormat = "$#,##0.00"
Else
    With WorksheetFunction
    Select Case Mid(Range("A1").NumberFormat, 3, 3)
        Case "AED"
            Range("B1").NumberFormat = "[$AED] #,##0.00"
        Case "CAD"
            Range("B1").NumberFormat = "[$CAD] #,##0.00"
        Case "PhP"
            Range("B1").NumberFormat = "[$PhP] #,##0.00"
    End Select
    End With
End If
End Sub
 
Upvote 0
Thanks for the suggestion -
- firstly i hoped to use a formula instead of a macro so it happens auromatically, although, I guess, I can use some trigger on a change to A1
- secondly this macro does not seem to change the format of cell B1 - i added breaks and it always goes down the Else branch but still does not change the format of B1

Also I will not know what currency format will be applied to A1 - I just want that format applied automatically to B1.

I am using Excel 2007 but doubt if that is the cause?

Thanks
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,767
Messages
6,126,773
Members
449,336
Latest member
p17tootie

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top