Sorry, I missed your logic above
Change the formula to
=IF(Denomination="USD",$B1
Main Topics
Browse All Topics
Hi
I want to create a macro that will take a range of cells and change them from $ to £ or visa versa depending on what they currently are.
The idea is that all the cells selected should be multiplied/divided by the exchange rate that will be put in a cell called Rate
All cells will be either $ or £ not a mixture
So if the cells have a $ value in them, they should all be reformatted to £ and divided by the exchange rate in the Rate cell
So if the cells have a £ value in them, they should all be reformatted to $ and multiplied by the exchange rate in the Rate cell
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I think Warcrimes came up with what you asked for, but if you wanted it on a selected area then the following works even with a mixture of formats.
Sub Exchange()
For Each xCell In Selection.Cells
If xCell.NumberFormat = "[$$-409]#,##0.00" Then 'It's in dollars
xCell.NumberFormat = "[$£-809]#,##0.00"
xCell.Value = xCell.Value / Range("rate").Value
Else
xCell.NumberFormat = "[$$-409]#,##0.00"
xCell.Value = xCell.Value * Range("rate").Value
End If
Next
End Sub
Business Accounts
Answer for Membership
by: WarCrimesPosted on 2009-06-11 at 09:01:45ID: 24603896
Hi Gordon,
*Rate,$B1/ Rate)
You already have a named range called Rate. I would add one called Denomination, where you can store the current denomination of the values, either USD or GBP. Then, you can use the following formula in the column next to your values.
Assuming your exchange rate is USD->GBP
For example, if B1 = 10.50
Then in C1 put
=IF(Denomination="USD",$B1
This formula can then be copied down for the entire list of values.
Cheers,
WC