ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Button to set different currencies (https://www.excelbanter.com/excel-worksheet-functions/222866-button-set-different-currencies.html)

kafukalatrava

Button to set different currencies
 
Hi all,

I'm working in a spreadsheet with different currencies.

Is there a way to create buttons to change the format of a cell to a
different currency? I'd need 3 of them (for ぎ, $ and ツ」 )

thx

Bernard Liengme[_3_]

Button to set different currencies
 
Begin by recording three macros: one for each currency. Here is mine for the
Euro

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 03/03/2009 by Bernard V Liengme
'
'
Range("A2").Select
Selection.NumberFormat = "[$?-2] #,##0.00"
End Sub

I edited this to become
Sub Euro()
ActiveCell.NumberFormat = "[$?-2] #,##0.00"
End Sub


Next use View | Toolbars | Forma to add three buttons to your worksheet
Assign one of your macros to each button as you make them
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"kafukalatrava" wrote in message
...
Hi all,

I'm working in a spreadsheet with different currencies.

Is there a way to create buttons to change the format of a cell to a
different currency? I'd need 3 of them (for ?, $ and 」 )

thx




Stefi

Button to set different currencies
 
Hi Bernard,

I also tried to solve this problem, and for euro my Excel recorded
numberformat "[$ぎ-2]# ##0,00"

Note the ぎ sign!

In VBA
ActiveCell.NumberFormat = "["[$ぎ-2]# ##0.00"
worked perfectly.

In your example ぎ sign is replaced by ? (question mark). Did it produce ぎ
sign on the worksheet?

I also recorded cell formatting to ツ」, and it resulted in a nice ツ」 9999.99
format in the cell but it was recorded in the macro as "[$L-809]#,##0.00"
format code.
In VBA
ActiveCell.NumberFormat = "[$L-809]#,##0.00"

gave an ugly L 9999.99 format.

In no way I could produce ツ」 9999.99 format in the cell through VBA.

Do you know why? And how to overcome it?

Regards,
Stefi


曖ernard Liengme ezt テ*rta:

Begin by recording three macros: one for each currency. Here is mine for the
Euro

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 03/03/2009 by Bernard V Liengme
'
'
Range("A2").Select
Selection.NumberFormat = "[$?-2] #,##0.00"
End Sub

I edited this to become
Sub Euro()
ActiveCell.NumberFormat = "[$?-2] #,##0.00"
End Sub


Next use View | Toolbars | Forma to add three buttons to your worksheet
Assign one of your macros to each button as you make them
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"kafukalatrava" wrote in message
...
Hi all,

I'm working in a spreadsheet with different currencies.

Is there a way to create buttons to change the format of a cell to a
different currency? I'd need 3 of them (for ?, $ and ツ」 )

thx





Bernard Liengme[_3_]

Button to set different currencies
 
Yes I got the ? sign
Maybe it depends on the font being used
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Stefi" wrote in message
...
Hi Bernard,

I also tried to solve this problem, and for euro my Excel recorded
numberformat "[$?-2]# ##0,00"

Note the ? sign!

In VBA
ActiveCell.NumberFormat = "["[$?-2]# ##0.00"
worked perfectly.

In your example ? sign is replaced by ? (question mark). Did it produce ?
sign on the worksheet?

I also recorded cell formatting to 」, and it resulted in a nice 」 9999.99
format in the cell but it was recorded in the macro as "[$L-809]#,##0.00"
format code.
In VBA
ActiveCell.NumberFormat = "[$L-809]#,##0.00"

gave an ugly L 9999.99 format.

In no way I could produce 」 9999.99 format in the cell through VBA.

Do you know why? And how to overcome it?

Regards,
Stefi


"Bernard Liengme" ezt rta:

Begin by recording three macros: one for each currency. Here is mine for
the
Euro

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 03/03/2009 by Bernard V Liengme
'
'
Range("A2").Select
Selection.NumberFormat = "[$?-2] #,##0.00"
End Sub

I edited this to become
Sub Euro()
ActiveCell.NumberFormat = "[$?-2] #,##0.00"
End Sub


Next use View | Toolbars | Forma to add three buttons to your worksheet
Assign one of your macros to each button as you make them
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"kafukalatrava" wrote in
message
...
Hi all,

I'm working in a spreadsheet with different currencies.

Is there a way to create buttons to change the format of a cell to a
different currency? I'd need 3 of them (for ?, $ and 」 )

thx








All times are GMT +1. The time now is 02:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com