Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default I need to switch currencies based on a pull-down selection

How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default I need to switch currencies based on a pull-down selection

On Sep 3, 10:16 am, rband wrote:
How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?


I would put the exchange rates in a cell somewhere, I assume you'd
have this already. And do one for dollars, too, with just a 1 in the
cell. Then name each of those rate cells with the same name as the
selections for your pulldown. Then have the range cells calculate
with:
=YourFormula*INDIRECT(B1)

Where B1 is your pulldown cell.

You'd also want to do Conditional Formats if you plan on having the
currency symbols formatted.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default I need to switch currencies based on a pull-down selection

Spiky, thanks but I guess I didn't explain myself clearly. I understand what
you've suggested and actually I already had that in the spreadsheet. What I
am attempting to do is to take a column of numbers formatted as currency in
US dollars and whan I select pounds or euros, the calculation works fine I
just want the symbols to change to either pounds or euros. Thanks for the
help and sorry I wasn't clearer.

"Spiky" wrote:

On Sep 3, 10:16 am, rband wrote:
How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?


I would put the exchange rates in a cell somewhere, I assume you'd
have this already. And do one for dollars, too, with just a 1 in the
cell. Then name each of those rate cells with the same name as the
selections for your pulldown. Then have the range cells calculate
with:
=YourFormula*INDIRECT(B1)

Where B1 is your pulldown cell.

You'd also want to do Conditional Formats if you plan on having the
currency symbols formatted.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default I need to switch currencies based on a pull-down selection

rband wrote:
Spiky, thanks but I guess I didn't explain myself clearly. I understand what
you've suggested and actually I already had that in the spreadsheet. What I
am attempting to do is to take a column of numbers formatted as currency in
US dollars and whan I select pounds or euros, the calculation works fine I
just want the symbols to change to either pounds or euros. Thanks for the
help and sorry I wasn't clearer.


Some variation of the following could work:

=IF(B1="Pounds",TEXT(A1,"[$£-809]#,##0.00"),IF(B1="Euros",TEXT(A1,"[$‚¬-2]
#,##0.00"),TEXT(A1,"$#,##0.00")))
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default I need to switch currencies based on a pull-down selection

On Sep 3, 12:51 pm, rband wrote:
Spiky, thanks but I guess I didn't explain myself clearly. I understand what
you've suggested and actually I already had that in the spreadsheet. What I
am attempting to do is to take a column of numbers formatted as currency in
US dollars and whan I select pounds or euros, the calculation works fine I
just want the symbols to change to either pounds or euros. Thanks for the
help and sorry I wasn't clearer.

"Spiky" wrote:
On Sep 3, 10:16 am, rband wrote:
How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?


I would put the exchange rates in a cell somewhere, I assume you'd
have this already. And do one for dollars, too, with just a 1 in the
cell. Then name each of those rate cells with the same name as the
selections for your pulldown. Then have the range cells calculate
with:
=YourFormula*INDIRECT(B1)


Where B1 is your pulldown cell.


You'd also want to do Conditional Formats if you plan on having the
currency symbols formatted.


Crap, I forgot that conditional formatting doesn't include number/text
formatting. At least, not before xl2007. Bizarre oversight by
Microsoft.

I see 2 options. One is VBA to change the format since conditional
doesn't work. Two is to have a mess of IF/TEXT formulas to do this.
But then any SUM or whatever calc you do on this range will have to be
switched back to values to work.

So this changes the formatting to include the currency sign, but
changes to text format:
=IF(dropdown="dollar",TEXT(formula,"$#,##0.00_);($ #,##0.00)"),
IF(dropdown="euro",TEXT(formula,"[$€-2] #,##0.00_);([$€-2]
#,##0.00)"),
TEXT(formula,"[$£-809]#,##0.00;-[$£-809]#,##0.00")))

I tried a simple SUM/VALUE array formula to see if I could add these
"text" numbers up. It works with dollars, works with euro, doesn't
work with pounds. Damn British.


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default I need to switch currencies based on a pull-down selection

Thanks, I'll play around and see what I can come up with.

"Glenn" wrote:

rband wrote:
Spiky, thanks but I guess I didn't explain myself clearly. I understand what
you've suggested and actually I already had that in the spreadsheet. What I
am attempting to do is to take a column of numbers formatted as currency in
US dollars and whan I select pounds or euros, the calculation works fine I
just want the symbols to change to either pounds or euros. Thanks for the
help and sorry I wasn't clearer.


Some variation of the following could work:

=IF(B1="Pounds",TEXT(A1,"[$£-809]#,##0.00"),IF(B1="Euros",TEXT(A1,"[$‚¬-2]
#,##0.00"),TEXT(A1,"$#,##0.00")))

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default I need to switch currencies based on a pull-down selection

Thanks, I'm going to take what Glenn suggested and what you've presented and
see if I can make some magic!

"Spiky" wrote:

On Sep 3, 12:51 pm, rband wrote:
Spiky, thanks but I guess I didn't explain myself clearly. I understand what
you've suggested and actually I already had that in the spreadsheet. What I
am attempting to do is to take a column of numbers formatted as currency in
US dollars and whan I select pounds or euros, the calculation works fine I
just want the symbols to change to either pounds or euros. Thanks for the
help and sorry I wasn't clearer.

"Spiky" wrote:
On Sep 3, 10:16 am, rband wrote:
How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?


I would put the exchange rates in a cell somewhere, I assume you'd
have this already. And do one for dollars, too, with just a 1 in the
cell. Then name each of those rate cells with the same name as the
selections for your pulldown. Then have the range cells calculate
with:
=YourFormula*INDIRECT(B1)


Where B1 is your pulldown cell.


You'd also want to do Conditional Formats if you plan on having the
currency symbols formatted.


Crap, I forgot that conditional formatting doesn't include number/text
formatting. At least, not before xl2007. Bizarre oversight by
Microsoft.

I see 2 options. One is VBA to change the format since conditional
doesn't work. Two is to have a mess of IF/TEXT formulas to do this.
But then any SUM or whatever calc you do on this range will have to be
switched back to values to work.

So this changes the formatting to include the currency sign, but
changes to text format:
=IF(dropdown="dollar",TEXT(formula,"$#,##0.00_);($ #,##0.00)"),
IF(dropdown="euro",TEXT(formula,"[$‚¬-2] #,##0.00_);([$‚¬-2]
#,##0.00)"),
TEXT(formula,"[$£-809]#,##0.00;-[$£-809]#,##0.00")))

I tried a simple SUM/VALUE array formula to see if I could add these
"text" numbers up. It works with dollars, works with euro, doesn't
work with pounds. Damn British.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default I need to switch currencies based on a pull-down selection

Adjust to suit. DV dropdown assumed H1

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("H1")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
With Me.Range("A1:F50")
Select Case Target.Value
Case "USD"
.NumberFormat = "$#,##0.00"
Case "Pound"
.NumberFormat = "£#,##0.00"
Case "Euro"
.NumberFormat = "€#,##0.00"
End Select
End With
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that module, edit to suit then Alt + q to return to the
Excel window.


Gord Dibben MS Excel MVP

On Wed, 3 Sep 2008 08:16:01 -0700, rband
wrote:

How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?


  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default I need to switch currencies based on a pull-down selection

Gord - This is perfect! Thanks very much.

"Gord Dibben" wrote:

Adjust to suit. DV dropdown assumed H1

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("H1")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
With Me.Range("A1:F50")
Select Case Target.Value
Case "USD"
.NumberFormat = "$#,##0.00"
Case "Pound"
.NumberFormat = "£#,##0.00"
Case "Euro"
.NumberFormat = "‚¬#,##0.00"
End Select
End With
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that module, edit to suit then Alt + q to return to the
Excel window.


Gord Dibben MS Excel MVP

On Wed, 3 Sep 2008 08:16:01 -0700, rband
wrote:

How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default I need to switch currencies based on a pull-down selection

Good to hear

Thanks for the feedback.

On Thu, 4 Sep 2008 05:32:04 -0700, rband
wrote:

Gord - This is perfect! Thanks very much.

"Gord Dibben" wrote:

Adjust to suit. DV dropdown assumed H1

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("H1")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
With Me.Range("A1:F50")
Select Case Target.Value
Case "USD"
.NumberFormat = "$#,##0.00"
Case "Pound"
.NumberFormat = "£#,##0.00"
Case "Euro"
.NumberFormat = "€#,##0.00"
End Select
End With
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste into that module, edit to suit then Alt + q to return to the
Excel window.


Gord Dibben MS Excel MVP

On Wed, 3 Sep 2008 08:16:01 -0700, rband
wrote:

How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?






  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default I need to switch currencies based on a pull-down selection

I have the same need with a variation: I want the currency format of cell I1
to be based on the entry in cell H1; format of cell I2 based on H2; etc. Is
this possible through this method?

"rband" wrote:

How can I cause a range of cells to change from Dollar to either Pounds or
Euros based on the appropriate selection from an in-cell pulldown?

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
how can I unhide/hide a sheet based on pull down selection? Keith Excel Discussion (Misc queries) 1 August 12th 08 04:17 PM
How can I switch the pmt function to calculate based on a 360 day mcovington Excel Worksheet Functions 1 August 30th 06 04:01 PM
How to create a pull down menu for selection? Eric Excel Worksheet Functions 2 March 10th 06 03:51 PM
how to creat a selection pull down window? accountant2005 Excel Worksheet Functions 1 September 30th 05 12:53 AM
limit cell list selection based on the selection of another list lorraine Excel Worksheet Functions 2 December 14th 04 08:17 PM


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

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

About Us

"It's about Microsoft Excel"