How to add currency symbol to a cell value

G

Guest

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
 
P

Pete_UK

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
 
G

Guest

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
 
F

fortune88

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top