ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to add currency symbol to a cell value (https://www.excelbanter.com/excel-discussion-misc-queries/166414-how-add-currency-symbol-cell-value.html)

Vinod[_2_]

How to add currency symbol to a cell value
 
Is there any possibility to add currency symbol to cell values by using
conditional format from built-in currency symbols based on selected currency
from combo dropdown box in my excel workbook.

or is there any other solution.

Advanced Thanks,
Vinod



Pete_UK

How to add currency symbol to a cell value
 
Why not just format the cells as currency? - Format | Cells | Number
tab | Currency, and choose the number of decimal places and the symbol
to be used.

Pete

On Nov 16, 8:04 pm, Vinod wrote:
Is there any possibility to add currency symbol to cell values by using
conditional format from built-in currency symbols based on selected currency
from combo dropdown box in my excel workbook.

or is there any other solution.

Advanced Thanks,
Vinod



Vinod[_2_]

How to add currency symbol to a cell value
 
I mean to say, I wanted to use conditional format for a cell which is based
on a cell A1.

In other wards in my workbook cell B1 consists value 100 and there is a
combobox (Formcontrol) which is linked to cell A1. Dropdown consists of
currencies list like USD,CNY,GBP,HKD, UNDEFINED(No symbol). If I select "CNY"
from dropdown then "CNY" will store at cell A1.

1. Finally I wanted to display cell B1 value with prifix of cell A1 value
i.e., B1 should display as CNY 100.

2. If I select "GBP" then B1 should display as GBP 100.
3. If I select "HKD" then B1 should display as HKD 100.
4. If I select "UNDEFINED" then B1 should display simplay as 100 (without
symbol).

Advanced Thanks,
Vinod

"Pete_UK" wrote:

Why not just format the cells as currency? - Format | Cells | Number
tab | Currency, and choose the number of decimal places and the symbol
to be used.

Pete

On Nov 16, 8:04 pm, Vinod wrote:
Is there any possibility to add currency symbol to cell values by using
conditional format from built-in currency symbols based on selected currency
from combo dropdown box in my excel workbook.

or is there any other solution.

Advanced Thanks,
Vinod




[email protected]

How to add currency symbol to a cell value
 
HI Vinod,

I'm not sure if you're still monitoring your posting. I have a similar
situation which may work for yours as well. The way I setup is I put
the currency symbols in column A from A1 to A10 and the numbers in
column B. I also used Data-Validation on column A, so the user is
forced to select 5 types of currency symbols (CAD, USD, EUR, GBP and
Unassigned). The macro is done through a worksheet change event. Let
me know if this works for you.

Mike James
======

Private Sub Worksheet_Change(ByVal Target As Range)

Set t = Target

On Error GoTo ErrHandler:

If Intersect(t, Range("A2:A10")) Is Nothing Then Exit Sub

Select Case t
Case "CAD"
t.Offset(0, 1).NumberFormat = "[$CAD ]* #,##0"

Case "USD"
t.Offset(0, 1).NumberFormat = "[$USD ]* #,##0"

Case "EUR"
t.Offset(0, 1).NumberFormat = "[$EUR ]* #,##0"

Case "GBP"
t.Offset(0, 1).NumberFormat = "[$GBP ]* #,##0"

Case "Unassigned"
t.Offset(0, 1).NumberFormat = "[$ ]* #,##0"

End Select

Exit Sub

ErrHandler:

End Sub


All times are GMT +1. The time now is 02:36 AM.

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