Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Eqa Eqa is offline
external usenet poster
 
Posts: 52
Default recognizing the next cell and inserting the correct currency symbo

I have a cell say A1 with a drop down list of choosen currencies.eg. US $. In
the next cell say B1, I want it to insert the correct symbol depending on the
currency picked to be automatically inserted. In this case $. How can I do
this?

Hope this is clear.

Thanks Eqa.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default recognizing the next cell and inserting the correct currency symbo

Use a combination of Data Validation and VLOOKUP().

Somewhere in the worksheet create a table. The first column of the table is
a textual description of the currency:

Dollar
Euro
Mark
..
..
..
Next to the first column, insert a single character for each currency symbol

In A1 put the data validation pull-down
In B1 put the VLOOKUP to get the symbol.
--
Gary''s Student - gsnu200756


"Eqa" wrote:

I have a cell say A1 with a drop down list of choosen currencies.eg. US $. In
the next cell say B1, I want it to insert the correct symbol depending on the
currency picked to be automatically inserted. In this case $. How can I do
this?

Hope this is clear.

Thanks Eqa.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Eqa Eqa is offline
external usenet poster
 
Posts: 52
Default recognizing the next cell and inserting the correct currency s

Gary I have just realised that I cannot enter a numeric value into the cell
without ruining the VLookup formula. How do I get around this?

Thanks,
Eqa

"Gary''s Student" wrote:

Use a combination of Data Validation and VLOOKUP().

Somewhere in the worksheet create a table. The first column of the table is
a textual description of the currency:

Dollar
Euro
Mark
.
.
.
Next to the first column, insert a single character for each currency symbol

In A1 put the data validation pull-down
In B1 put the VLOOKUP to get the symbol.
--
Gary''s Student - gsnu200756


"Eqa" wrote:

I have a cell say A1 with a drop down list of choosen currencies.eg. US $. In
the next cell say B1, I want it to insert the correct symbol depending on the
currency picked to be automatically inserted. In this case $. How can I do
this?

Hope this is clear.

Thanks Eqa.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default recognizing the next cell and inserting the correct currency s

Let say rather than put a single character in B1 via VLOOKUP, we want to
format a value in B1 based upon the entry in A1.

Unfortunately this cannot be accomplished easily with conditional
formatting. Insert the following macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A:A")
Set t = Target
If Intersect(t, r) Is Nothing Then Exit Sub
v = t.Value
With t.Offset(0, 1)
Select Case v
Case "dollar"
.NumberFormat = "$#,##0.00"
Case "pound"
.NumberFormat = "[$£-809]#,##0.00"
Case "euro"
.NumberFormat = "[$‚¬-2] #,##0.00"
End Select
End With
End Sub

If you enter {pound, dollar, euro} in any cell in column A, the macro will
automatically re-format the adjacent cell in column B.

REMEMBER the worksheet code area, not a standard module.
--
Gary''s Student - gsnu200756


"Eqa" wrote:

Gary I have just realised that I cannot enter a numeric value into the cell
without ruining the VLookup formula. How do I get around this?

Thanks,
Eqa

"Gary''s Student" wrote:

Use a combination of Data Validation and VLOOKUP().

Somewhere in the worksheet create a table. The first column of the table is
a textual description of the currency:

Dollar
Euro
Mark
.
.
.
Next to the first column, insert a single character for each currency symbol

In A1 put the data validation pull-down
In B1 put the VLOOKUP to get the symbol.
--
Gary''s Student - gsnu200756


"Eqa" wrote:

I have a cell say A1 with a drop down list of choosen currencies.eg. US $. In
the next cell say B1, I want it to insert the correct symbol depending on the
currency picked to be automatically inserted. In this case $. How can I do
this?

Hope this is clear.

Thanks Eqa.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting Rows and Maintaining Correct Balances Floridaguy Excel Discussion (Misc queries) 5 November 1st 07 01:25 PM
Currency sum not correct Excel 2003 IL-Exceluser Excel Worksheet Functions 1 January 23rd 07 09:33 AM
Recognizing Cell Formatting To Use In A Formula Or Conditional For Jim J. Excel Worksheet Functions 0 September 20th 06 08:28 PM
Inserting another currency rather than $ on excel Sahr Gbondo Excel Worksheet Functions 1 December 31st 05 10:53 AM
Keeping a sum colum correct after inserting a colum of data in fro hazel Excel Discussion (Misc queries) 3 October 19th 05 09:51 PM


All times are GMT +1. The time now is 10:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"