VBA Code to Change Currency Format
Bob Phillips gave you part of the answer. If you want to cycle through all
your worksheets just enclose his suggestion in a For Loop.
Something like follwing should work but you will need to expand the Case
test for each currency you want to format
For Each sh In ActiveWorkbook.Sheets
Select Case Me.ComboBox1.Text '<< assume you have currency symbols
in a combobox
Case "$"
sh.Range("A1:A100").NumberFormat = _
"[$$-409]#,##0.00_ ;[Red]-[$$-409]#,##0.00 "
Case "£"
sh.Range("A1:A100").NumberFormat = _
"£#,##0.00;(£#,##0.00)"
End Select
Next sh
--
jb
"Jim" wrote:
Perhaps I wasn't clear, I only want the formating to change, not any of the
values. If I prepare a contract in £, I want all currency cells (hundreds
over many sheets) to use £ in the currency format. If the contract is in $
or GEL, I want all the currency cell formats to change to the selected
currency.
"Atishoo" wrote:
Hm
Im thinking that you create a worksheet to function in one standard curreny
(say US Dollar) and then on your other sheets each cell that contains a
currency value should be a multiplication of the value in us dollars by the
exchange rate set from your opening page.
"Jim" wrote:
I'm building a report book template that I want to use for multiple
currencies (only one per book). The first sheet would have a currency
selection box that then format all the relevent cells in the other sheets to
the selected currency format. I know how to do it the long way, but was
hoping someone could suggest an easy quick solution.
Thanks in advance.
JIM
|