#### Change currency on all sheets based on one cell value

```Hello,

I need to change currency formatting based on one selected value. So, if the
user changes Italy as their base country, I want the currency to change to €.
If they choose the UK, I want the currency to change to £. I have a cell
(Inputs!A1) which updates to 1 for euro country and 2 for the UK. The cells
ranges that need to change are Inputs!L94-M94, Inputs!L96:M98 and
Calculations!A1:D5.

Is this doable?

--
Johanna
```
 0
Utf
2/5/2010 10:24:01 AM
excel.programming 6508 articles. 2 followers.

3 Replies
800 Views

Similar Articles

[PageSpeed] 43

```On Feb 5, 10:24=A0am, Johanna Gronlund
<JohannaGronl...@discussions.microsoft.com> wrote:
> Hello,
>
> I need to change currency formatting based on one selected value. So, if =
the
> user changes Italy as their base country, I want the currency to change t=
o =80.
> If they choose the UK, I want the currency to change to =A3. I have a cel=
l
> (Inputs!A1) which updates to 1 for euro country and 2 for the UK. The cel=
ls
> ranges that need to change are Inputs!L94-M94, Inputs!L96:M98 and
> Calculations!A1:D5.
>
> Is this doable? =A0
>
>
> --
> Johanna

Hi

You can use this code (where A1 is the cell which changes from 1 to 2
etc):-

Private Sub Worksheet_Change(ByVal Target As Range)

If Cells.Range("A1").Value =3D 1 Then
Worksheets("Inputs").Cells.Range("L94:M94").NumberFormat =3D "[\$
=80-2]#,##0.00"
Worksheets("Inputs").Cells.Range("L96:M98").NumberFormat =3D "[\$
=80-2]#,##0.00"
Worksheets("Calculations").Cells.Range("A1:D5").NumberFormat =3D
"[\$=80-2]#,##0.00"
Else
If Cells.Range("A1").Value =3D 2 Then
Worksheets("Inputs").Cells.Range("L94:M94").NumberFormat =3D
"=A3#,##0.00"
Worksheets("Inputs").Cells.Range("L96:M98").NumberFormat =3D
"=A3#,##0.00"
=20
Worksheets("Calculations").Cells.Range("A1:D5").NumberFormat =3D
"=A3#,##0.00"
End If
End If
End If

End Sub

Hope this helps in some way.
KR Matt
http://teachr.blogspot.com
```
 0
Matt
2/5/2010 11:26:52 AM
```For some reason nothing happens if I paste this in the module 1. Is that the
right place to paste it? Is there anything else that I might be could be
doing wrong?

Thanks!

--
Johanna

"Matt Richardson" wrote:

> On Feb 5, 10:24 am, Johanna Gronlund
> <JohannaGronl...@discussions.microsoft.com> wrote:
> > Hello,
> >
> > I need to change currency formatting based on one selected value. So, if the
> > user changes Italy as their base country, I want the currency to change to €.
> > If they choose the UK, I want the currency to change to £. I have a cell
> > (Inputs!A1) which updates to 1 for euro country and 2 for the UK. The cells
> > ranges that need to change are Inputs!L94-M94, Inputs!L96:M98 and
> > Calculations!A1:D5.
> >
> > Is this doable?
> >
> > Many thinks in advance.
> >
> > --
> > Johanna
>
> Hi
>
> You can use this code (where A1 is the cell which changes from 1 to 2
> etc):-
>
> Private Sub Worksheet_Change(ByVal Target As Range)
>
>
> If Target.Address = "\$A\$1" Then
>     If Cells.Range("A1").Value = 1 Then
>         Worksheets("Inputs").Cells.Range("L94:M94").NumberFormat = "[\$
> €-2]#,##0.00"
>         Worksheets("Inputs").Cells.Range("L96:M98").NumberFormat = "[\$
> €-2]#,##0.00"
>         Worksheets("Calculations").Cells.Range("A1:D5").NumberFormat =
> "[\$€-2]#,##0.00"
>     Else
>         If Cells.Range("A1").Value = 2 Then
>             Worksheets("Inputs").Cells.Range("L94:M94").NumberFormat =
> "£#,##0.00"
>             Worksheets("Inputs").Cells.Range("L96:M98").NumberFormat =
> "£#,##0.00"
>
> Worksheets("Calculations").Cells.Range("A1:D5").NumberFormat =
> "£#,##0.00"
>         End If
>     End If
> End If
>
> End Sub
>
>
> Hope this helps in some way.
> KR Matt
> http://teachr.blogspot.com
> .
>
```
 0
Utf
2/5/2010 2:20:01 PM
```On Feb 5, 2:20=A0pm, Johanna Gronlund
<JohannaGronl...@discussions.microsoft.com> wrote:
> For some reason nothing happens if I paste this in the module 1. Is that =
the
> right place to paste it? Is there anything else that I might be could be
> doing wrong?
>
> Thanks!
>
> --
> Johanna
>
>
>
> "Matt Richardson" wrote:
> > On Feb 5, 10:24 am, Johanna Gronlund
> > <JohannaGronl...@discussions.microsoft.com> wrote:
> > > Hello,
>
> > > I need to change currency formatting based on one selected value. So,=
if the
> > > user changes Italy as their base country, I want the currency to chan=
ge to =80.
> > > If they choose the UK, I want the currency to change to =A3. I have a=
cell
> > > (Inputs!A1) which updates to 1 for euro country and 2 for the UK. The=
cells
> > > ranges that need to change are Inputs!L94-M94, Inputs!L96:M98 and
> > > Calculations!A1:D5.
>
> > > Is this doable? =A0
>
> > > Many thinks in advance.
>
> > > --
> > > Johanna
>
> > Hi
>
> > You can use this code (where A1 is the cell which changes from 1 to 2
> > etc):-
>
> > Private Sub Worksheet_Change(ByVal Target As Range)
>
> > If Target.Address =3D "\$A\$1" Then
> > =A0 =A0 If Cells.Range("A1").Value =3D 1 Then
> > =A0 =A0 =A0 =A0 Worksheets("Inputs").Cells.Range("L94:M94").NumberForma=
t =3D "[\$
> > =80-2]#,##0.00"
> > =A0 =A0 =A0 =A0 Worksheets("Inputs").Cells.Range("L96:M98").NumberForma=
t =3D "[\$
> > =80-2]#,##0.00"
> > =A0 =A0 =A0 =A0 Worksheets("Calculations").Cells.Range("A1:D5").NumberF=
ormat =3D
> > "[\$=80-2]#,##0.00"
> > =A0 =A0 Else
> > =A0 =A0 =A0 =A0 If Cells.Range("A1").Value =3D 2 Then
> > =A0 =A0 =A0 =A0 =A0 =A0 Worksheets("Inputs").Cells.Range("L94:M94").Num=
berFormat =3D
> > "=A3#,##0.00"
> > =A0 =A0 =A0 =A0 =A0 =A0 Worksheets("Inputs").Cells.Range("L96:M98").Num=
berFormat =3D
> > "=A3#,##0.00"
>
> > Worksheets("Calculations").Cells.Range("A1:D5").NumberFormat =3D
> > "=A3#,##0.00"
> > =A0 =A0 =A0 =A0 End If
> > =A0 =A0 End If
> > End If
>
> > End Sub
>
> > Hope this helps in some way.
> > KR Matt
> >http://teachr.blogspot.com
> > .

Paste this in the module of the worksheet that you want to change.  It
should work then.

Matt
http://teachr.blogspot.com
```
 0
Matt
2/11/2010 3:18:37 PM

Similar Artilces:

Hi, I've a sheet linked to an external data on the net, and I would like that a cell in this sheet to indicate the last date and time it was updated, the simplest way the better but I can do some programming too. Thanks for your attention, -- Domingos Junqueira No need of help any more, I solved the question. Thanks again ...

Why does the change change to a number?
Hi all, I've noticed something wierd and always wondered WHY it happens. When you type a date into a cell, and then change the Formatting of it to a 'general' cell, it turns into a number. How does it come up with that number? What is the significance? i.e. type today's date of "12/7/2007" - change it to a 'General' format, and it then says "39423". I'm a trainer of Excel and this question always comes up. I'm curious myself too. Thanks! Joe It's the number of days since January zero 1900 using Excel default for windows (M...

How to Unhide or Hide Multiple Sheets at One GO?
Hi Everyone I guess my Subject Title has already said what I need to know. SO is i possible to hide or unhide a selection of worksheets at one go? Cheers Kelvi -- Message posted from http://www.ExcelForum.com Kelvin, Select the sheets to hide, then Format>Sheet>Hide -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "hce >" <<hce.12cnl1@excelforum-nospam.com> wrote in message news:hce.12cnl1@excelforum-nospam.com... > Hi Everyone > > I guess my Subject Title has a...

changing the way Excel displays selected cells
Is there a way to change the way Excel displays selected cells? I'm interested in viewing all the selected cells highlighted (with light blue for instance), but by default excel highlights all the cells but not the first one the same occurs when you define a range with no adyacents cells Your definition of the display is not quite correct. Excel highlights the current cell, Excel also highlights a selecte range. The currently selected cell is generally the first of a range, bu press enter and the current cell changes and becomes the second, the third etc in the range. You cannot...

Excel should have the option to merge contents when merging cells.
When Excel merges cells, it keeps only the upper-left-most contents and deletes the others. It would be nice to have the option (maybe a toggle button in the options menu) to concatenate the contents of all the merged cells, so that the information in the lower-right cells is tacked onto the end of the information inthe upper-left-most cell. This is not a big deal, but it would be a nice bell/whistle to save some steps. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I...

Track Changes
How do i remove the track changes in outlook? When i press "Enter", a symbol that represents "Enter" will appears. Same for space etc. ...

DST changes for Exchange 5.5
I noticed the 2007 DST Calendar Update "Exchange tool" is available now: http://support.microsoft.com/kb/930879 This will seemingly take care of calendars for mailboxes still on Exchange 5.5 servers, as Exchange 5.5 is listed as "compatible" . However would this address the CDO issues such as BlackBerry users and OWA users still on Exchange 5.5 ? Thanks in advance, Itrcb4 On Mon, 12 Feb 2007 14:31:00 -0800, itrcb4 <itrcb4@discussions.microsoft.com> wrote: >I noticed the 2007 DST Calendar Update "Exchange tool" is available now: > >http://su...

more on VBA function name change
I thought I'd start a new thread since I haven't received any replies to my first one... To recap: I've declared a function in a module using mixed case: Function TMDE_Category (FormName As Form) I noticed recently that it appeared in the module as Function tmde_category(FormName As Form) I changed it back to the mixed case declaration, saved the module, exited the app, reopened it and looked. The function had changed back to the all lowercase declaration. Things I've tried since the original post: Using the databse documenter, I selected all ob...

Stop sheet showing when Using Datapig's Force Users to enable macr
Hi, I think this is probably not do-able I'm using Datapig Technologies example to force users to enable macros When the workbook is closed all sheets other than a warning sheet are very hidden so that if the workbook is opened with macros disabled then the user can only see a warning sheet saying to close and open with macros enabled. Then on opening with macros enabled the waring sheet is very hidden and the other sheets can be seen. Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.ScreenUpdating = False Sheets("Warning").Visible = True Sh...

Can't Publish changes with Deploy Manager
After a migration process, I can't publish the changes made on CRM. When I try do this in Deploy Manager I get the follow error: ---------------------------------------------------------------------------- ----- Publish done with errors. See the event log to get deitails NETRA-INOVACAO: ***Error*** Failed to download XSL template files from Web Server ---------------------------------------------------------------------------- ----- Can somebody help me? I don't know if the migration process have any relationship with the error. Thank you for pay attention. []'s Vin�cius Pitta...

VLOOKUP: Retrieving Values
Vlookup: I am trying to lookup a value ( SCOTLAND ) on a spreadsheet called ( Data ) in order to populate ceratin cells on my other spreadsheet ( Spreadone ). If the value (SCOTLAND) is located in (Data) I want it to copy the values of specific cells (not all of them ) from the same row into ( Spreadone ). So : CHECK COLUMN N (CLASS) IN SPREADSHEET (DATA) FOR STRING (SCOTLAND) IF THE STRING = SCOTLAND THEN IN SPREADSHEET (Spreadone) POPULATE CELL A7:A25 = ACCOUNT NO (from Data) CELL B7:B25 = CLIENT (from Data) CELL C7:C25 = CUSIP (from Data) CELL D7:D25 = QTY (from Data) CELL E7:E25...

witch one should i get
Hi im Sam i want to buy the latest ms money but witch one should i get i want every can someone compare with Microsoft Money 2006 Standard and Microsoft Money 2006 Premium and Microsoft Money 2006 Deluxe or Microsoft Money 2006 Small Business please would someone help be to decide the best one thank you Sam M06 is two versions obsolete hence two versions closer to being unsupported/disabled from online services. Deluxe is fine for most people. Premium adds some features of slight value to some and large value to others. If you do not have a business need, do not get the business editi...

How to change icon for my application
Hi, I am currently developing an application on visual studio 6.0, and i wish to change the MFC icon on my application header. Anyone can help? Thank you. Raed Sawalha wrote: > Hi, I am currently developing an application on visual studio 6.0, and i > wish to change the MFC icon on my application header. Anyone can help? Thank > you. > > Open the icon resource for editing by double clicking. Then notice the control just above the editing grid that lets you switch between editing the large icon and editing the small one. -- Scott McPhillips [VC++ MVP] thanx that work...

How to change newsgroup message font
Like many other ribbon based programs I sometimes struggle to find how to make a change. This time its how to change the font just for newsgroup messages? regards "nobody" wrote in message news:EWTao.39493\$GF5.7129@hurricane... > Like many other ribbon based programs I sometimes struggle to find how to make a change. This time its how to change the font just for newsgroup messages? Newsgroup messages are usually plain text. The font used is that selected at [no name tab] > Options > Mail > Read > Fonts for the encoding specified for the messag...

Taking the Mode based on cell value
Could you provide a few more details about what you want to do? -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "sip8316" <sip8316@discussions.microsoft.com> wrote in message news:E3F4DE24-C5E8-4911-96E6-E61A1E56DEF0@microsoft.com... > ...

Notify change of email address when changing ISP
How do I notify my entire address book of an email address when I change ISP's? Thanks By sending a mail to everyone ? If you do so, please use BCC for the adresses, this way you won't spread everybody's e-mail adres to everybody. Niels Bob Baker wrote: > How do I notify my entire address book of an email address when I change ISP's? > Thanks ...

Which one first?Install Windows Server 2003 SP1 or Exchange SP2 ?
Hi, We are running Exchange 2003 on Windows Server 2003. We planned to update the software in terms of patches, so which one should I do first, the OS patches (SP1 and onwards) or the Exchange patches ? Rgrds, Zul If it was me do the OS first. "Zul J" <mlist@istar.com.my> wrote in message news:%23AeXnXErFHA.2076@TK2MSFTNGP14.phx.gbl... > Hi, > > We are running Exchange 2003 on Windows Server 2003. We planned to update > the software in terms of patches, so which one should I do first, the OS > patches (SP1 and onwards) or the Exchange patches ? > ...

Change a formula to an acual number
I want to change the formula I have created to the number it has created Example: Cell A1 is the number 1. Cell A2 is the formula =a1+1 creatin the number 2. I want this to be a two not a formula. Any ideas? Laura, copy, then paste special, valves -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my email address to reply by email ** "Laura" <anonymous@discussions.microsoft.com> wrote in message news...

Copy worksheet to new workbook : Values & Formats
Hi, Is it possible to cpy an entire worksheet (Values & Formats) to a new workbook without copying formulas ? Sheets(X).Copy is building links to previous workbook. Thks for help After coping go to Edit->Links, and break links, and excel will replace links with values. If you do it from VBA, which seems so, try with PasteSpecial metod. "Franck" <wesley.saris@gmail.com> wrote in message news:1130320762.209498.135290@g43g2000cwa.googlegroups.com... > Hi, > Is it possible to cpy an entire worksheet (Values & Formats) to a new > workbook without copying f...

Hi all I have a spreadsheet with a number of sheets. on sheet one is a merge row in column a with the heading and then various rows with the data A N 123 B A 123 C M 334 D E 233 The first 3/4 rows are identical on the next sheets and are linked to sheet 1 (if sheet 1 changes the data changes). However I may need to add a new row in sheet one (in example above a new row between the 123 and 123. Is there a way that will update the new row on the other sheets. Any suggestions greatly appreciated Rexmann Ps I use Excel XP on the sheets other than sheet1 in column A use =indirect...

Problem Changing an Investment Name
I am trying to change an investment name and Money 2006 tells me "The name or symbol 'TRP Spectrum Income' has already been used for a deleted investment. Please enter a different name." When I go to delete investments the name does not appear! Any ideas on how I get Money to accept the name change? This is the first time I have run into this situation and I have made numerous name changes in Money over the years. In microsoft.public.money, Ken wrote: >I am trying to change an investment name and Money 2006 tells me "The name >or symbol 'TRP Spec...

How to copy a column of values into another column where the cells are merged
Hi, I have a sheet with a column that lists some values. I also have a second sheet that has a column where the cells are merged every 4 rows. I need to copy the values of the first sheet into the merged cells, but when I do, I only see every fourth value on the merged cells. Is there a formula or any other way that I can use to be able to copy all the values from the first sheet into the second sheet each value on a different group of merged cells? Thanks! Assume you have values in A1:A5 of Sheet1 that you want to copy into Sheet2, where A1:A4, A5:A8, A9;A12 etc are merged. Put this formul...

Should I change this code?
Should I change 556 to 560???..............Thanks for your help..........Bob Private Sub Command560_Click() On Error GoTo Err_Command556_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "frmClientInfomation" DoCmd.OpenForm stDocName, , , stLinkCriteria Exit_Command556_Click: Exit Sub Err_Command556_Click: MsgBox Err.Description Resume Exit_Command556_Click End Sub On Sun, 15 Jul 2007 16:37:26 +1200, "Bob V" <rjvance@ihug.co.nz> wrote: > >Should I change 556 to 560???..............Thanks for your help.....

Need to reference a block of cells from another sheet.
Dear All, apologies if this is probably a mundane question, but I didn't know what 'search terms' to put in google to return any results.. I've got a Spreadsheet with 12 tabs (sheets), I need part of tab 12 (sheet) to appear on tabs 1-11 (sheets), so that if I change data in tab 12 (sheet), tabs 1-11 (sheets) are changed too.. the cells themselves will never move location, just the data within them.. Is it possible? Regards Paul. On your sheet1 select the cell that should receive the data from Sheet12; Hold down the Shift key and Click on Sheet11 << this shoul...

How to change default font in Outlook 2003
Can someone tell me how to change tthe default font in Outlook 2003 when composing a new email. It always comes up as Times New Roman. I remember somewhere that I specified that Outlook should use Word as the text editor and that seems to be the case. I have Arial as my default font in Word but this seems to make no difference when using Outlook. Hi, Please go to Tools > Setting > Mail Format > Stationery and Fonts > Fonts It's right there :) On 20 Nov 2005 06:28:45 -0800, amarsarit@gmail.com wrote: >Hi, >Please go to Tools > Setting > Mail Format > Statione...